Cms: GraphQL exclude by id

Created on 23 Oct 2019  路  4Comments  路  Source: craftcms/cms

It looks like there it's not possible at this point to exclude elements by their id. This Feature would be really great especially when fetching related entries.

enhancement graphql

Most helpful comment

Screenshot 2019-10-24 at 12 12 56

Coming to a release near you soon.

All 4 comments

another good suggestion, I think. I had excellent reason to need and request this fully functional on 'another GraphQL'. That's gone away with Craft 3.3's abilities, but could well come up for other projects.

It may be that there's a kind of standard naming for this query modifier: idNot:

You know what. Thank you for prodding on this. I thought it wouldn't be possible in a clean manner since an array of integers cannot contain strings and vice-versa.

But, as it turns out, there is a way to do that to make ["not", 20, 120] possible. Just have to add this to every query argument that can accept not.

giphy

Screenshot 2019-10-24 at 12 12 56

Coming to a release near you soon.

Alright, with the next release you'll be able to that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RitterKnightCreative picture RitterKnightCreative  路  3Comments

brandonkelly picture brandonkelly  路  3Comments

bitboxfw picture bitboxfw  路  3Comments

mattstein picture mattstein  路  3Comments

davist11 picture davist11  路  3Comments