Package org.apache.sling.graphql.api
Interface SchemaProvider
@ProviderType
public interface SchemaProvider
-
Method Summary
-
Method Details
-
getSchema
@Nullable @Nullable String getSchema(@NotNull @NotNull org.apache.sling.api.resource.Resource r, @Nullable @Nullable String[] selectors) throws IOException Get a GraphQL Schema definition for the given resource and optional selectors- Parameters:
r- The Resource to which the schema appliesselectors- Optional set of Request Selectors that can influence the schema selection- Returns:
- a GraphQL schema that can be annotated to define the data fetchers to use, see this module's documentation. Can return null if a schema cannot be provided, in which case a different provider should be used.
- Throws:
IOException- if the schema cannot be retrieved
-