birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

__typename does not match generated type #280

Open kilinkis opened 3 years ago

kilinkis commented 3 years ago

On gatsby@2.20.13 and latest gatsby-source-prismic-graphql

my query:

export const heroSliceFragment = graphql`
    fragment HeroSlice on PRISMIC_Slice_pageBodyHero {
        primary {
            title
            predefined {
                __typename
                ...Form_title
            }
        }
    }
`

when I log slice.primary.predefined.__typename, I get Form_title, but on the generated graph types, it shows as PRISMIC_Form_title. So it leads to a typescript error.

Any ideas on what could be wrong? Thanks in advance