-
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
WordPress settings can't be queried? #29684
Comments
Also having this issue
|
@jonlow apologies for the delay here - I'm investigating this now. In the meantime if you're still running into this issue you can get around it by querying for
|
@TylerBarnes curious why settings are considered nodes in Gatsby? Possibly that's the bug? The settings objects don't implement the Node interface. . .this seems like a bug to me. I wouldn't expect to query settings as a node |
Everything is a node in Gatsby so this is required. When we eventually add support for multiple instances of the plugin you'll want to be able to select which site you want to get settings from too 👍 |
|
@TylerBarnes ah, interesting. Since settings objects don't have an ID, they don't follow the node spec. But I suppose if you are identifying them by the origin endpoint, they might indeed have a unique identifier. 🤔 |
They do have an id :) it's the site url - I set it when I create each node. |
It seems the problem here is the plugin is somehow adding the input args from another node type. I'm not sure why yet but I'll get to the bottom of it soon |
Ah, ya, since that's a departure from WPGraphQL, that should probably be documented then. Is that why we weren't able to query them individually then? Do we need to query:
|
It's undocumented right now because the plugin only supports a single instance. Using |
@jasonbahl @jonlow the reason is you both have types in your WPGQL schema named "Filter" and Gatsby has a bug where it then uses fields from this type to create input filter arguments for other node types resulting in broken queries. |
@TylerBarnes interesting. In my case this is the |
This is fixed in |
It appears there is some sort of regression with settings from WordPress.
Trying to query:
Doesn't work. It says that a
databaseId
anduri
are required input for querying thewp
field.The text was updated successfully, but these errors were encountered: