climatescape / climatescape.org

Discover the organizations solving climate change
https://climatescape.org/
MIT License
79 stars 20 forks source link

[build warning] Warning message with `gatsby-source-filesystem` #199

Open ehmicky opened 4 years ago

ehmicky commented 4 years ago

When running gatsby build, either locally or in Netlify CI, the following warning is printed:

warn Plugin `gatsby-source-filesystem` tried to define built-in Gatsby GraphQL type `File`
warn Multiple node fields resolve to the same GraphQL field `Airtable.data.Organization` - [`Organization___NODE`, `Organization`]. Gatsby will use `Organization___NODE`.
warn There are conflicting field types in your data.

If you have explicitly defined a type for those fields, you can safely ignore this warning message.
Otherwise, Gatsby will omit those fields from the GraphQL schema.

If you know all field types in advance, the best strategy is to explicitly define them with the `createTypes` action, and skip inference with the `@dontInfer` directive.
See https://www.gatsbyjs.org/docs/actions/#createTypes
Airtable.data.Submissions:
 - type: array
   value: [ ..., 'recCJg2l0dwb7AO3k', ... ]
 - type: string
   value: '2NDNATURE Software, 2NDNATURE'

This might be related to #81.

jbolda commented 4 years ago

To help resolve some of the conflicting types, I would recommend checking out these two sections in the docs: https://github.com/jbolda/gatsby-source-airtable#using-markdown-and-attachments https://github.com/jbolda/gatsby-source-airtable#naming-conflicts

We more recently added the separateNodeType and separateMapType which gives you tools to resolve the conflicting types. Effectively the node types are the same but the underlying data is not of the same type. Using these options, you can create new types.