Closed steveDL closed 3 years ago
Can't seem to replicate this with a simple query using the GraphQL Explorer:
{
nodes (navHandle: "mainMenu") {
url
}
}
Can you advise what query you're using, and from where you're calling it from, if not from the GraphQL Explorer?
Any update on this?
I should mention, this could possibly be tied up to the schema permissions introduced in 1.4.6. Can you let me know if you're using your own custom schema or just using the public schema.
If the former, you'll need to enable permissions to query nodes on your schema.
multiple queries kills it
query MyQuery {
sitenav: nodes(navHandle: "sitenav", level: 1) {
title
}
subnav: nodes(navHandle: "subnav", level: 1) {
title
}
}
@magicspon Pretty sure this might be related to Craft 3.6+ as again, I can't replicate that issue on Craft 3.5.x or 3.6.x
I can't seem to replicate this behaviour no matter what @magicspon. But I believe the original issue for @steveDL would be permissions based, in that you need to opt-in to querying navigations, if you're using schemas.
@engram-design I just upgraded to Craft 3.6.11.2 and Navigation 1.4.15 and I think I'm experiencing this too. I'm using custom schemas and I've enabled View all navigations
for my schema. When I try to query a node, I get an error like:
"debugMessage": "Tried to load an unregistered type \"primary_Node\". This can indicate both a typo in the query or an issue with the schema used.",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
When I explicitly add my navigations to the schema, then my queries work as expected.
Edit: just for reference, adding View all forms
to my schema does work as expected for Formie.
Should be fixed for the next release. To get the fix early, change your verbb/navigation
requirement in composer.json
to:
"require": {
"verbb/navigation": "dev-craft-3 as 1.4.15",
"...": "..."
}
Then run composer update
.
Fixed in 1.4.16
Description
Upgrade to 1.4.10 and you will get
GraphQL error: Cannot query field "nodes" on type "Query".
Downgrading has fixed the issue.
Steps to reproduce
Additional info