
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
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attributes Problem - Cloud
I am not able to see the attribute columns and their context on cloud. Can you help?
- Authorization header not working in Appw...
I have an Appwrite function that takes a custom bearer token as authentication. The function works fine locally when I test it with `appwrite run functions`, bu...
