AND filter for the Graphql endpoint
November 15, 2019 at 3:36pmAND filter for the Graphql endpoint
November 15, 2019 at 3:36pm (Edited 3 years ago)Hey, i'm relatively new and sadly the filtering for the graphql is pretty badly documented. Is there a way to do an AND filter?
My query, which only filters OR:
query GET_CLIENT_INVENTORIES($clientId: ID!, $productId: ID!) {inventories(where: { client: { id: $clientId }, product: { id: $productId } }) {idamountproduct {idproductFormat {idname}productName {idname}}}}
November 18, 2019 at 4:46pm
Hello! sadly you didn't find documentation to do that because it's not possible for not.
I suggest you to create your own resolver to match this need.
Here is the docs https://strapi.io/documentation/3.0.0-beta.x/plugins/graphql.html#customise-the-graphql-schema
Then you will have to use custom queries to achieve your
AND
query.
We have a work to do on this part. Thank you for this feedback.November 21, 2019 at 8:03am
November 25, 2019 at 11:43am
November 26, 2019 at 8:46am
how i can filter only by nom in parameter like that and how can add this parameter in the query graphql
November 28, 2019 at 1:08pm
November 29, 2019 at 9:02am
the params attribute in the function should be obligation a ID ?? because it seeing nom like a ID not string
December 5, 2019 at 1:33pm