@PublicApi public class IntrospectionWithDirectivesSupport extends java.lang.Object
type __Field { name: String! // other fields ... appliedDirectives: [_AppliedDirective!]! // NEW FIELD } type _AppliedDirective { // NEW INTROSPECTION TYPE name: String! args: [_DirectiveArgument!]! } type _DirectiveArgument { // NEW INTROSPECTION TYPE name: String! value: String! }
Modifier and Type | Class and Description |
---|---|
static interface |
IntrospectionWithDirectivesSupport.DirectivePredicate
A callback which allows you to decide what directives may be included
in introspection extensions
|
static interface |
IntrospectionWithDirectivesSupport.DirectivePredicateEnvironment
The parameter environment on a call to
IntrospectionWithDirectivesSupport.DirectivePredicate |
Constructor and Description |
---|
IntrospectionWithDirectivesSupport()
This version lists all directives on a schema element
|
IntrospectionWithDirectivesSupport(IntrospectionWithDirectivesSupport.DirectivePredicate directivePredicate)
This version allows you to filter what directives are listed via the provided predicate
|
IntrospectionWithDirectivesSupport(IntrospectionWithDirectivesSupport.DirectivePredicate directivePredicate,
java.lang.String typePrefix)
This version allows you to filter what directives are listed via the provided predicate
Some graphql systems (graphql-js in 2021) cannot cope with extra types starting with `__`
so we use a `_` as a prefix by default.
|
Modifier and Type | Method and Description |
---|---|
GraphQLSchema |
apply(GraphQLSchema schema)
This will transform the schema to have the new extension shapes
|
public IntrospectionWithDirectivesSupport()
public IntrospectionWithDirectivesSupport(IntrospectionWithDirectivesSupport.DirectivePredicate directivePredicate)
directivePredicate
- the filtering predicate to decide what directives are shownpublic IntrospectionWithDirectivesSupport(IntrospectionWithDirectivesSupport.DirectivePredicate directivePredicate, java.lang.String typePrefix)
directivePredicate
- the filtering predicate to decide what directives are showntypePrefix
- the prefix to put on the new `AppliedDirectives` typepublic GraphQLSchema apply(GraphQLSchema schema)
schema
- the original schema