@ProviderType
public interface QueryExecutor
QueryExecutor service allows consumers to validate and execute GraphQL queries directly.| Modifier and Type | Method and Description |
|---|---|
@NotNull Map<String,Object> |
execute(@NotNull String query,
@NotNull Map<String,Object> variables,
@NotNull org.apache.sling.api.resource.Resource queryResource,
@NotNull String[] selectors)
Executes the passed
query. |
ValidationResult |
validate(@NotNull String query,
@NotNull Map<String,Object> variables,
@NotNull org.apache.sling.api.resource.Resource queryResource,
@NotNull String[] selectors)
Validates the passed
query and variables, by checking if the query obeys the known schemas. |
ValidationResult validate(@NotNull @NotNull String query, @NotNull @NotNull Map<String,Object> variables, @NotNull @NotNull org.apache.sling.api.resource.Resource queryResource, @NotNull @NotNull String[] selectors)
query and variables, by checking if the query obeys the known schemas.query - the queryvariables - the query's variables; can be an empty Map if the query doesn't accept variablesqueryResource - the current resource, used as the root for the queryselectors - potential selectors used to select the schema applicable to the passed queryquery is valid, false otherwise@NotNull @NotNull Map<String,Object> execute(@NotNull @NotNull String query, @NotNull @NotNull Map<String,Object> variables, @NotNull @NotNull org.apache.sling.api.resource.Resource queryResource, @NotNull @NotNull String[] selectors)
query.query - the queryvariables - the query's variables; can be an empty Map if the query doesn't accept variablesqueryResource - the current resource, used as the root for the queryselectors - potential selectors used to select the schema applicable to the passed queryMap representing the query's resultSlingGraphQLException - if the execution of the query leads to any issuesCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.