datacite / lupo

DataCite REST API
https://api.datacite.org
MIT License
12 stars 8 forks source link

Explore using GraphQL lookahead to slim down calls to ElasticSearch #1080

Open jrhoads opened 11 months ago

jrhoads commented 11 months ago

By default, most of our GraphQL calls are implemented by call to Elasticsearch with extensive aggregations turned on. Many times we do not use the results of these aggregations.

GraphQL lookahead allows us to peak into the structure of a graphql query.

We might be able to use this to see if certain fields/aggregations are necessary for the GQL results. This would allow us to potentially drop those fields from the ElasticSearch Query

https://graphql-ruby.org/queries/lookahead