Package org.apache.sling.graphql.api
Interface SlingTypeResolver<T>
-
@ConsumerType public interface SlingTypeResolver<T>
Resolves the GraphQL object type of a given result item. Services must be registered with aNAME_SERVICE_PROPERTY
property with a unique value that's matched with the corresponding@directive
in the GraphQL Schema.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME_SERVICE_PROPERTY
Defines the service registration property with which allSlingTypeResolver
services have to be registered.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getType(@NotNull SlingTypeResolverEnvironment e)
-
-
-
Field Detail
-
NAME_SERVICE_PROPERTY
static final String NAME_SERVICE_PROPERTY
Defines the service registration property with which allSlingTypeResolver
services have to be registered. The value should be namespaced, with namespaces being delimited by the "/" character.- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
@Nullable T getType(@NotNull @NotNull SlingTypeResolverEnvironment e)
-
-