Cms: Craft 3.3 GraphQL relatedto argument

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

Description

There isn't an argument relatedTo in GraphQL to fetch, for example, entries associated to a category. Is there an alternative or is relatedTo gonna be added to GraphQL?

enhancement graphql

Most helpful comment

Added this for the next 3.3. release!

All 4 comments

relatedTo will be added to GraphQL, but it will support element IDs only, as there's no feasible way of providing a list of, say, categories to a GraphQL query.

Added this for the next 3.3. release!

There will be no way to pass in a category slug? This would be essential for things like having a url /blog/cats that makes a request for a list blogposts related to the cats category. I won't know the id, so I would have to make two requests to get the list of categories first just to get the id.

@dangayle that's a good point. Could you open a new issue for this? The immediate problem has been addressed and I feel like your issue should be a separate one with its own status and discussion.

Was this page helpful?
0 / 5 - 0 ratings