Code generation tool (graphql-codegen) or its dependency (graphql-tag-pluck) appear to not be able to resolve gatsby’s graphql-tag when using require. Updating these to use import syntax resolves this issue. This is the same format used by gatsby-source-contentful as well.
Without this change we are not able to reference the fragments when generating TS types.
Code generation tool (graphql-codegen) or its dependency (graphql-tag-pluck) appear to not be able to resolve gatsby’s graphql-tag when using
require
. Updating these to useimport
syntax resolves this issue. This is the same format used by gatsby-source-contentful as well.Without this change we are not able to reference the fragments when generating TS types.