Hello everyone,
I'm querying prismic's REST API, and I'm wondering whether it's possible to trim down the amount of data that comes back from it.
I'm trying to query just a list of names from a collection, but the API returns a ton of unnecessary meta data:
1. license: "All Rights Reserved"
2. next_page: some-url
3. page: 0
4. prev_page: null
5. results: (11) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
6. results_per_page: 20
7. results_size: 11
8. total_pages: 1
9. total_results_size: 11
10. version: "ec04165"
And each result has this shape:
1. alternate_languages: []
2. data: {name: "The data I want"}
3. first_publication_date: "2021-01-22T12:50:41+0000"
4. href: some-url
5. id: "asdf"
6. lang: "en"
7. last_publication_date: "2021-01-22T12:50:41+0000"
8. linked_documents: []
9. slugs: ["theslug"]
10. tags: []
11. type: "page"
12. uid: null
I wonder if there's a way to make this query faster by removing literally all of this data, except for "The data I want", which is buried deep in the API response? I'm restricting that data via the graphQuery
search param, but I don't need any of the other data either.