Closed vvasiloud closed 3 years ago
Hello,
I'm trying to query fields with options but I am having exception:
{ ""errors": [ { "debugMessage": "Expected a value of type \"String\" but received: {\"label\":\"MyLabel\",\"order\":0,\"selected\":false,\"calc\":null,\"value\":\"mylabel\"}", "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 18, "column": 11 } ], "path": [ "form", "fields", "nodes", 0, "options", 0 ], "trace": [ { "file": "/var/www/html/wp-content/plugins/wp-graphql/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php", "line": 787, "call": "GraphQL\\Executor\\ReferenceExecutor::completeLeafValue(GraphQLType: String, array(5))" }, [...] ] }, }
Add here is the example of the query:
query MyQuery { form(id: "1", idType: DATABASE_ID) { title fields { nodes { fieldId label key type required order ... on ListradioField { fieldLabel label key type required options order } } } } }
The issue seems to be present even with a default Listradio field using WpGraphQL 1.3.4.
Any thoughts?
Thanks in advance.
Hi @vvasiloud thanks for the feedback.
My bad, there was no definition of a specific type for the list element.
I just released version 0.1.2 which should fix this bug.
Works perfectly now, many thanks!
Hello,
I'm trying to query fields with options but I am having exception:
Add here is the example of the query:
The issue seems to be present even with a default Listradio field using WpGraphQL 1.3.4.
Any thoughts?
Thanks in advance.