![](https://cdn.discordapp.com/embed/avatars/2.png)
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
- Error uploading more than 1MB
- Access blocked by CORS policy
Getting the following error message while uploading or updating image files at Appwrite Storage. ``` Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/...
- Many to many relationships restrictions ...
Hi! I'm creating and testing a simple data model and I'm a bit confused about how one way relationship restrictions work with many to many relationship. I will ...
![](/images/bgs/pre-footer.png)