Package org.apache.sling.graphql.api

# Interface SlingTypeResolverEnvironment<T>

@ProviderType public interface SlingTypeResolverEnvironment<T>
Provides contextual information to the `SlingTypeResolver`

## Method Summary

Modifier and Type
Method
Description
`@Nullable org.apache.sling.api.resource.Resource`
`getCurrentResource()`
`@Nullable Object`
`getObject()`
`T`
`getObjectType(@NotNull String name)`
`@Nullable String`
`getResolverOptions()`
`@Nullable String`
`getResolverSource()`

## Method Details

### getCurrentResource

@Nullable @Nullable org.apache.sling.api.resource.Resource getCurrentResource()

Returns:
  the current Sling resource

### getResolverOptions

@Nullable @Nullable String getResolverOptions()

Returns:
  the options, if set by the schema directive

### getResolverSource

@Nullable @Nullable String getResolverSource()

Returns:
  the source, if set by the schema directive

### getObject

@Nullable @Nullable Object getObject()

Returns:
  the GraphQL result item

### getObjectType

@Nullable T getObjectType(@NotNull @NotNull String name)

Parameters:
  `name` - the type name
Returns:
  the GraphQL Object Type