inbn / component-gallery

The Component Gallery is a collection of components from the best Design Systems. Built with Gatsby and Airtable.
https://component.gallery
MIT License
164 stars 10 forks source link

TypeError: Cannot read property 'allAirtable' of undefined #9

Closed caidentity closed 3 years ago

caidentity commented 3 years ago

Hi, after downloading I'm getting the following error. Is this due to mis aligning airtable fields?


 ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "allAirtable" on type "Query".

If you don't expect "allAirtable" to exist on the type "Query" it is most likely a typo.
However, if you expect "allAirtable" 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 "allAirtable" 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 a 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 "Query":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions

File: gatsby-node.js:14:10

 ERROR 

Cannot read property 'allAirtable' of undefined

  TypeError: Cannot read property 'allAirtable' of undefined

  - gatsby-node.js:35 Promise
    /Users/repo/component-gallery/gatsby-node.js:35:17
inbn commented 3 years ago

Hi there, That does indeed look like an issue with the airtable fields. To be honest I never expected anyone else to try and run the project!

If I have time this weekend, I'll put together a skeleton airtable project with the correct schema.

inbn commented 3 years ago

The project Readme now includes a link to a working Airtable base.