-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The remote WPGraphQL schema hasn't changed but local generated type definitions have. #37931
Comments
also having this issue! any word on when this may be patched/how to work around it? |
I have the same issue using docker, wordpress and mysql, can someone help us on this mess?
|
@marlenesco or @rmeghji are you able to provide a repro? For now you can work around it by setting |
Same issue with gatsby-source-contentful. Local schema gets corrupted over time and have to clear cache to correct. |
Hi @TylerBarnes, thank you for your answer, I've tried to put the process.env.WP_INCONSISTENT_SCHEMA_WARN = 'true' but I have the same issue. In the next days I'll put a repo online to try to fix this strange behaviour. |
@marlenesco this is where it's checked in gatsby/packages/gatsby-source-wordpress/src/steps/create-schema-customization/helpers.js Line 438 in fd4d702
|
I don't want to hijack this thread but I'm seeing something similar with info gatsby-source-wordpress Panicking due to inconsistent schema customization. Turn this into a warning by setting process.env.WP_INCONSISTENT_SCHEMA_WARN to a string of "true"
ERROR #gatsby-source-wordpress_112004 PLUGIN
gatsby-source-wordpress The remote WPGraphQL schema hasn't changed but local generated type definitions have. This is a bug, please open an issue on Github and include the following text..
Changed type defs:
Typename WpProductToProductAttributeConnectionType diff:
{
kind: "OBJECT"
config: {
name: "WpProductToProductAttributeConnectionType"
fields: {
nodes: {
type: "[WpProductAttribute!]!"
description: "The nodes of the connection, without the edges"
}
pageInfo: {
type: "WpProductToProductAttributeConnectionPageInfoType!"
description: "Information about pagination in a connection."
}
}
description: "Connection between the Product type and the ProductAttribute type"
extensions: {
infer: false
}
interfaces: [
+ "WpProductAttributeConnectionType"
"WpConnectionType"
]
}
}
Typename WpProductAttributeConnectionType diff:
+{
+ kind: "INTERFACE"
+ config: {
+ name: "WpProductAttributeConnectionType"
+ fields: {
+ nodes: {
+ type: "[WpProductAttribute!]!"
+ description: "A list of connected ProductAttribute Nodes"
+ }
+ pageInfo: {
+ type: "WpProductAttributeConnectionPageInfoType!"
+ description: "Information about pagination in a connection."
+ }
+ }
+ extensions: {
+ infer: false
+ }
+ interfaces: [
+ "WpConnectionType"
+ ]
+ }
+}
Typename WpProductAttributeConnectionEdgeType diff:
+{
+ kind: "INTERFACE"
+ config: {
+ name: "WpProductAttributeConnectionEdgeType"
+ fields: {
+ node: {
+ type: "WpProductAttribute!"
+ description: "The connected ProductAttribute Node"
+ }
+ }
+ extensions: {
+ infer: false
+ }
+ interfaces: [
+ "WpEdgeType"
+ ]
+ }
+}
Typename WpProductToGlobalProductAttributeConnectionType diff:
{
kind: "OBJECT"
config: {
name: "WpProductToGlobalProductAttributeConnectionType"
fields: {
nodes: {
type: "[WpGlobalProductAttribute!]!"
description: "The nodes of the connection, without the edges"
}
pageInfo: {
type: "WpProductToGlobalProductAttributeConnectionPageInfoType!"
description: "Information about pagination in a connection."
}
}
description: "Connection between the Product type and the GlobalProductAttribute type"
extensions: {
infer: false
}
interfaces: [
+ "WpGlobalProductAttributeConnectionType"
"WpConnectionType"
]
}
}
Typename WpGlobalProductAttributeConnectionType diff:
+{
+ kind: "INTERFACE"
+ config: {
+ name: "WpGlobalProductAttributeConnectionType"
+ fields: {
+ nodes: {
+ type: "[WpGlobalProductAttribute!]!"
+ description: "A list of connected GlobalProductAttribute Nodes"
+ }
+ pageInfo: {
+ type: "WpGlobalProductAttributeConnectionPageInfoType!"
+ description: "Information about pagination in a connection."
+ }
+ }
+ extensions: {
+ infer: false
+ }
+ interfaces: [
+ "WpConnectionType"
+ ]
+ }
+}
Typename WpGlobalProductAttributeConnectionEdgeType diff:
+{
+ kind: "INTERFACE"
+ config: {
+ name: "WpGlobalProductAttributeConnectionEdgeType"
+ fields: {
+ node: {
+ type: "WpGlobalProductAttribute!"
+ description: "The connected GlobalProductAttribute Node"
+ }
+ }
+ extensions: {
+ infer: false
+ }
+ interfaces: [
+ "WpEdgeType"
+ ]
+ }
+}
Typename WpProductToLocalProductAttributeConnectionType diff:
{
kind: "OBJECT"
config: {
name: "WpProductToLocalProductAttributeConnectionType"
fields: {
nodes: {
type: "[WpLocalProductAttribute!]!"
description: "The nodes of the connection, without the edges"
}
pageInfo: {
type: "WpProductToLocalProductAttributeConnectionPageInfoType!"
description: "Information about pagination in a connection."
}
}
description: "Connection between the Product type and the LocalProductAttribute type"
extensio
...
[Diff exceeded 5000 characters and was truncated] I have the following setup in schema: {
typePrefix: `Wp`,
timeout: 4 * 60 * 1000,
},
includedRoutes: ['**/pages'],
excludedRoutes: [
'**/posts',
'**/media',
'**/categories',
'**/tags',
'**/taxonomies',
'**/users',
],
type: {
__all: {
limit: process.env.NODE_ENV === `development` ? 100 : 5000,
},
Post: {
limit: 20,
where: 'categoryNotIn: "retired"',
},
MediaItem: {
localFile: {
maxFileSizeBytes: 1048576 * 20, // 20 MB
},
excludeFieldNames: [
'contentNodes',
'seo',
'ancestors',
'author',
'template',
'lastEditedBy',
'authorDatabaseId',
'authorId',
'contentTypeName',
'dateGmt',
'desiredSlug',
'enclosure',
'isContentNode',
'isTermNode',
'modified',
'modifiedGmt',
'parentDatabaseId',
'parentId',
'srcSet',
'parent',
'children',
],
},
Comment: {
limit: 0,
},
Tag: {
limit: 0,
},
User: {
limit: 0,
},
UserRole: {
limit: 0,
},
Customer: {
limit: 0,
},
Coupon: {
limit: 0,
},
Order: {
limit: 0,
},
PaRole: {
limit: 0,
},
Product: {
limit: 0,
where: 'categoryNotIn: "retired"',
},
ProductTag: {
limit: 0,
},
ProductType: {
limit: 0,
},
ProductCategory: {
limit: 0,
},
ProductAttribute: {
limit: 0,
},
GlobalProductAttribute: {
limit: 0,
},
PaymentGateway: {
limit: 0,
},
Refund: {
limit: 0,
},
ShippingClass: {
limit: 0,
},
ShippingMethod: {
limit: 0,
},
TaxRate: {
limit: 0,
},
VisibleProduct: {
limit: 0,
},
Organizer: {
limit: 0,
},
Venue: {
limit: 0,
},
ContentType: {
limit: 0,
},
Category: {
// limit: 0,
},
Taxonomy: {
limit: 0,
},
},
develop: {
hardCacheMediaFiles: true,
},
debug: {
graphql: {
onlyReportCriticalErrors: false,
showQueryVarsOnError: true,
showQueryOnError: true,
writeQueriesToDisk: true,
},
}, |
I was able to work this around by turning all plugins off and turning them back all together at once. (When I turn it on individually it caused the same problem again🤷). Also, I change the endpoint back to /graphql, instead of a custom one. I know it sounds weird and not exactly sure what fixed this but worked for me, so I wanted to share. |
I'm getting a similar error to @therealgilles, when I set WP_INCONSISTENT_SCHEMA_WARN to true, I get the following errors:
|
I solved the problem with # gatsby clean, then # gatsby develop |
Does it come back on a subsequent gatsby develop? I can silence it, but need to clean & develop more often than not. |
For me it occurs whenever I change the schema on my WordPress backend, where I'm adding new custom fields and content types. Basically it appears that Gatsby doesn't do diligence on schema changes during the develop ramp up and quits. Once I have the schema set, I don't usually have to run clean. Although it's kind of today's version of Ctrl Alt Delete... |
For me this seems to occur with with newer versions of the wp graphql plugin. It works fine if I roll back to v1.12.2 |
Same here - error after wpgraphql plugin update, works fine if I roll back to 1.13.10. Clearing cache didn't help. WPGraphQL ver. 1.14.9 |
Been sitting with this problem for months now and unable to find answers. Now there's the push from Gatsby Cloud to Netlify and time is running out. But unable to move my site until I can resolve this. *update I came across this solution: #37729 (comment) I ended up removing the |
|
Any updates here? |
continuing my check every month. Any solutions? |
@pieh Can you check this? |
Site maintenance day again. Any updates here? |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
This should be fixed in the latest release 🎉 thanks @pieh |
Preliminary Checks
Description
Fresh WordPress Installation with the following plugins installed:
advanced-custom-fields-pro
event-tickets
gravityforms
learndash-hub
sfwd-lms
the-events-calendar
woocommerce
wp-gatsby
wp-graphql
wp-graphql-acf-master
wp-graphql-cors-master
wp-graphql-cpt-master
wp-graphql-gravity-forms-develop
wp-graphql-jwt-authentication-develop
wp-graphql-woocommerce-develop
GraphQL Endpoint targeted: https://learngatsby.wpengine.com/graphql
Error occurs on first run of npm run develop.
Error is attached as TXT.
gatsby-source-terminal-error.txt
Reproduction Link
https://github.com/daniel-layers/learn-gatsby
Steps to Reproduce
Expected Result
Site to launch and be ready for use.
Actual Result
Failed to build.
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: