Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
GraphQL Core 0.0.10
-
None
-
None
Description
I'd like to implement selector driven prepared queries, here's a rough spec:
- Any Sling resource can be a GraphQL endpoint (already implemented).
- If a GET request includes selectors, they can point to a prepared GraphQL query.
- A PreparedQueryProvider service is used to store and retrieve prepared queries.
- A GraphQL Mutation (to the same URL) can be used to store prepared queries depending on the user authorizations.
- When executing a prepared query, the HTTP request parameters are provided as GraphQL query variables
The goal is similar to theĀ /persisted API that we already support, but "in-place" without having to address a different resource to run the query, and using a Mutation to store it, for consistency . It should be possible to disable both the /persisted mechanism and this new variant by configuration, as in most cases we probably don't want to have both active.