Bertrand Delacretaz created SLING-10540:
-------------------------------------------

             Summary: Selector-driven prepared GraphQL queries
                 Key: SLING-10540
                 URL: https://issues.apache.org/jira/browse/SLING-10540
             Project: Sling
          Issue Type: Improvement
          Components: GraphQL
    Affects Versions: GraphQL Core 0.0.10
            Reporter: Bertrand Delacretaz
            Assignee: Bertrand Delacretaz


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to