-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I have followed the instructions to set up a Contentful Gatsby frontend:
- created the Medusa store
- created the Contentful space
- migrated and seeded the Contentful space
- checked all content is published
- started the content store
- created the Gatsby site
- update the .env
- run the Gatsby server
I get the following errors:
yarn start
yarn run v1.22.5
$ gatsby develop
success open and validate gatsby-configs, load plugins - 0.723s
success onPreInit - 0.006s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution, we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 0.061s
success copy gatsby files - 0.038s
success Compiling Gatsby Functions - 0.205s
success onPreBootstrap - 0.217s
success createSchemaCustomization - 0.006s
success Contentful: Sync all items - 0.270s - 41/41 151.80/s
warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.
warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.
warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.
warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.
success Contentful: Fetch data (kes128waviyg-master) - 1.201s
info Updated entries 35
info Deleted entries 0
info Updated assets 6
info Deleted assets 0
success Contentful: Process data (kes128waviyg-master) - 0.059s
info Creating 8 Contentful Link nodes
info Creating 2 Contentful Hero nodes
info Creating 5 Contentful Navigation Item nodes
info Creating 2 Contentful Navigation Menu nodes
info Creating 5 Contentful Product Variant nodes
info Creating 2 Contentful Product nodes
info Creating 2 Contentful Region nodes
info Creating 3 Contentful Tile nodes
info Creating 3 Contentful Tile Section nodes
info Creating 3 Contentful Page nodes
info Creating 6 Contentful Asset nodes
success Contentful: Create nodes (kes128waviyg-master) - 0.100s
success Checking for changed pages - 0.001s
success source and transform nodes - 1.515s
success building schema - 1.079s
success createPages - 0.001s
success createPagesStatefully - 0.116s
info Total nodes: 130, SitePage nodes: 11 (use --verbose for breakdown)
success Checking for changed pages - 0.003s
success update schema - 0.204s
success write out redirect data - 0.002s
success onPostBootstrap - 0.002s
info bootstrap finished - 5.581s
success onPreExtractQueries - 0.002s
ERROR #85923 GRAPHQL
There was an error in your GraphQL query:
Cannot query field "thumbnail" on type "ContentfulProduct".
If you don't expect "thumbnail" to exist on the type "ContentfulProduct" it is most likely a typo.
However, if you expect "thumbnail" to exist there are a couple of solutions to common problems:
- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape
they have
- You want to optionally use your field "thumbnail" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A
quick fix is to add at least one entry with that field ("dummy content")
It is recommended to explicitly type your GraphQL schema if you want to use optional fields. This way you don't have to add the mentioned "dummy content". Visit our
docs to learn how you can define the schema for "ContentfulProduct":
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization#creating-type-definitions
File: src/pages/{ContentfulPage.slug}.js:66:15
etc
Any suggestions appreciated
Metadata
Metadata
Assignees
Labels
No labels