datocms / gatsby-source-datocms

Official GatsbyJS source plugin to pull content from DatoCMS
MIT License
140 stars 50 forks source link

change to gatsby import #93

Closed tbrannam closed 4 years ago

tbrannam commented 4 years ago

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.

stefanoverna commented 4 years ago

Thanks @tbrannam!