Query GraphQL By ID and not

I need to make a query by ID.

And also a query for other products and this query cannot bring up the product previously searched by id.

I don't have the option where not or not equal?

Hey @mktubuntu, it isn't possible to exclude documents. Here's the list of available filters that you can use with the metadata for the queries:


But there is a way to do this:

queryA - a query of a product by SLUG "xxx"
queryB - a related products query, where the products have the result category of queryA (queryA.category).

That is, use parameters from queryA to filter the search in queryB.

Are there any plans for feature/improvements on the GraphQL API? I'd really like to see the where filtering extended to allow not equals and more than a single argument. For example, I want to query documents with relations to document A and B. But the where filter only allows a single id as a parameter instead of an array.

- Kári

Hello @prismic5, we don't have plans to modify the functionality of the GraphQl filters for the moment.

Subscribe to our Prismic calendar so you don't miss the next product meetup!

And check out our progress page to see all the features we're currently working on