fabien0102 / gatsby-starter

Gatsby 2.0 starter with typescript and many cools dev tools
386 stars 99 forks source link

There are conflicting field types in your data. GraphQL schema will omit those fields. #74

Closed rickbrunstedt closed 6 years ago

rickbrunstedt commented 6 years ago

This is probably a easy fix, but I'm not sure how I should solve it.

warning There are conflicting field types in your data. GraphQL schema will omit those fields.
SitePage.context.documentation.get.returnType.type:
 - type: object
   value: { orderId: [Object], orderNumber: [Object], customerId: [Object], dateCreated: [Object], dateModified: [Object], items: [Object], payments: [Object], canceled: [Object], removed: [Object] }
   source: Your site's "gatsby-node.js"
 - type: string
   value: 'any'
   source: Your site's "gatsby-node.js"
SitePage.context.documentation.create.returnType.type:
 - type: object
   value: { orderId: [Object], orderNumber: [Object], customerId: [Object], dateCreated: [Object], dateModified: [Object], items: [Object], payments: [Object], canceled: [Object], removed: [Object] }
   source: Your site's "gatsby-node.js"
 - type: string
   value: 'any'
   source: Your site's "gatsby-node.js"
SitePage.context.documentation.remove.payload.type:
 - type: object
   value: { orderId: [Object], organizationId: [Object] }
   source: Your site's "gatsby-node.js"
 - type: string
   value: 'null'
   source: Your site's "gatsby-node.js"
SitePage.context.documentation.remove.returnType.type:
 - type: object
   value: { create: [Object], identityField: [Object], id: [Object], key: [Object], type: [Object], headers: [Object], schema: [Object], payload: [Object], timestamp: [Object], name: [Object], messageId: [Object], validator: [Object] }
   source: Your site's "gatsby-node.js"
 - type: string
   value: 'any'
   source: Your site's "gatsby-node.js"

This warning is annoying and I want to get rid of it, but not sure where to start really.

I have some variables named payload and returnType, but they are just javascript objects, which I'm passing down as context when creating page. When passed down as context on the createPage function, it gets converted into graphql nodes, am I right?

Is there a way of pass it down through context or something similar, in way that it don't turn it into graphql nodes?

I think it gives me error because some data is sometimes null, sometimes a string. To be honest I'm not completely sure.

I want to get rid of this so that I can conclude that this isn't the problem that I have for building on netlify.

The thing is that is builds fine locally though I still get the error/warning. But on Netlify it exceeds the time limit. I talked to Netlify support and they say that it could be some instance running that not completely stopping or shutting down correctly. AND when this part of the code is included in my deploy it doesnt work, if I comment it out, it do work.

Thanks

rickbrunstedt commented 6 years ago

Sorry, thought I was in github/gatsbyjs ... :/