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.
Drake
30 Dec, 2023, 18:31
The title should be there in data. You'll need to JSON decode it
Vishal Lohar
2 Jan, 2024, 09:46
Yes. I know that the title will be available in the data. But what if I just want the title?