I'm trying to use the GraphQL API to return a single attribute along with the _id, rather than the entire document. According to the documentation, the following should work:
query {
databasesListDocuments(
databaseId: "${DATABASE_ID}",
collectionId: "${COLLECTION_ID}"
) {
total
documents {
_id
data {
attribute1
}
}
}
}
However, I'm getting the following error:
Response: {"errors":[{"message":"Field data of type String must not have a sub selection.","extensions":{"category":"graphql"},"locations":[{"line":9,"column":16}]}]}
The following doesn't work either:
query {
databasesListDocuments(
databaseId: "${DATABASE_ID}",
collectionId: "${COLLECTION_ID}"
) {
total
documents {
_id
attribute1
}
}
}
Any ideas what I'm doing wrong?
Recommended threads
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...