Closed tremby closed 2 years ago
Yeah, good point. I suppose by default it should only come back with the enabled ones, and allow you to provide an argument on status to override that. I'm happy enough with this being a breaking change, as from a front-end perspective, you really have very little need for disabled nodes/blocks.
But taking it one step further, we should introduce querying via:
nodes(where: "{ \"type\": \"paragraph\" }", limit: 2) {
}
That's added/fixed for the next release. To get this early, change your verbb/vizy
requirement in composer.json
to:
"require": {
"verbb/vizy": "dev-craft-3 as 1.0.12",
"...": "..."
}
Then run composer update
.
I personally would actually prefer it to not be possible to retrieve disabled blocks, at least without having access to a GQL schema which specifically allows it. In my mind retrieving disabled blocks is akin to retrieving a draft version of the page -- it's not meant to be available to the public.
Or is that not what enabled/disabled is meant for? What's the purpose, if not?
Looking forward to disabled ones not coming through (at least by default) in the Craft 4 branch.
Thanks again.
I largely agree - but just keeping it possible to serve somewhat as backward compatibility (in case anyone is using disabled blocks - for whatever reason.
Will be sure to bring the craft-4 branch up to speed soon.
Fixed in 1.0.13 and 2.0.0-beta.3
Description
I'm not sure if this is intended or not, but if I flip the "enabled" toggle to off, the data about that block still comes through when querying the GQL endpoint.
I would expect them not to show up. Having the disabled ones show up means
Steps to reproduce
Additional info
Additional context