Package org.apache.sling.graphql.api
Interface SlingTypeResolverEnvironment<T>
@ProviderType
public interface SlingTypeResolverEnvironment<T>
Provides contextual information to the
SlingTypeResolver-
Method Summary
Modifier and TypeMethodDescription@Nullable org.apache.sling.api.resource.Resource@Nullable ObjectgetObjectType(@NotNull String name) @Nullable String@Nullable String
-
Method Details
-
getCurrentResource
@Nullable @Nullable org.apache.sling.api.resource.Resource getCurrentResource()- Returns:
- the current Sling resource
-
getResolverOptions
- Returns:
- the options, if set by the schema directive
-
getResolverSource
- Returns:
- the source, if set by the schema directive
-
getObject
- Returns:
- the GraphQL result item
-
getObjectType
- Parameters:
name- the type name- Returns:
- the GraphQL Object Type
-