I have a list of documents, with field_1, field_2, ...
Using graphql from the web skd (on localhost), i want to perform two requests
1.get all documents as field_1 = "a" AND field_2 = "b"
2.get all documents as field_1 = "a" OR field_2 = "b"
Folowing the doc, i wrote this code:
`const {Client, Databases, Query, Graphql} =Appwrite; const client = new Client() .setEndpoint("http://localhost:8080/v1/graphql") // Your API Endpoint .setProject(project_id) // Your project ID
const graphql = new Graphql(client);
const query = graphql.query({
query: query { databasesListDocuments( databaseId: "${db_id}", collectionId: "${collectionId}", queries: ["equal(\"field_1\", \"a\"), equal(\"field_2\", \"b\")"] ) { total documents { _id data } } }
})`
As result i have an array of error, with messages like:
message: "Field "databasesListDocuments" argument "queries" requires type String, found field_1."
message: "Field "databasesListDocuments" argument "queries" requires type String, found a."
...
What is the problem ?
How can i perform this request ?