TypeScript
databasesListDocuments(
databaseId: "[DATABASE_ID]",
collectionId: "[COLLECTION_ID]"
) {
total
documents {
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
data
}
}
}
This query is great but I can't decide what I want in data. Maybe I am fetching all blog posts but I just need the title of all the posts. How can I do it using GraphQL..
TL;DR
The user wants to retrieve only the title from a list of documents using GraphQL, instead of retrieving the entire data attribute. The solution is to modify the query to include only the desired fields.The title should be there in data. You'll need to JSON decode it
Yes. I know that the title will be available in the data. But what if I just want the title?
Recommended threads
- Paused project can't activate
I have failed to reactivate one my projects which had been paused
- Site deployment keeps getting failed
Hi good folks, need a hand with Sites deploy Error on every deploy: Synchronous function execution timed out... duration doesn't exceed 30 seconds [exact log ...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...