Package graphql.schema.transform
Class FieldVisibilitySchemaTransformation
- java.lang.Object
-
- graphql.schema.transform.FieldVisibilitySchemaTransformation
-
@PublicApi public class FieldVisibilitySchemaTransformation extends java.lang.Object
Transforms a schema by applying a visibility predicate to every field.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FieldVisibilitySchemaTransformation.AdditionalTypeVisibilityVisitor
private static class
FieldVisibilitySchemaTransformation.FieldRemovalVisitor
private static class
FieldVisibilitySchemaTransformation.TypeObservingVisitor
private static class
FieldVisibilitySchemaTransformation.TypeVisibilityVisitor
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Runnable
afterTransformationHook
private java.lang.Runnable
beforeTransformationHook
private VisibleFieldPredicate
visibleFieldPredicate
-
Constructor Summary
Constructors Constructor Description FieldVisibilitySchemaTransformation(VisibleFieldPredicate visibleFieldPredicate)
FieldVisibilitySchemaTransformation(VisibleFieldPredicate visibleFieldPredicate, java.lang.Runnable beforeTransformationHook, java.lang.Runnable afterTransformationHook)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphQLSchema
apply(GraphQLSchema schema)
private java.util.function.Function<GraphQLSchemaElement,java.util.List<GraphQLSchemaElement>>
getChildrenFn(GraphQLSchema schema)
private java.util.List<GraphQLObjectType>
getOperationTypes(GraphQLSchema schema)
private java.util.List<GraphQLSchemaElement>
getRootTypes(GraphQLSchema schema)
private GraphQLSchema
removeUnreferencedTypes(java.util.Set<GraphQLType> markedForRemovalTypes, GraphQLSchema connectedSchema)
-
-
-
Field Detail
-
visibleFieldPredicate
private final VisibleFieldPredicate visibleFieldPredicate
-
beforeTransformationHook
private final java.lang.Runnable beforeTransformationHook
-
afterTransformationHook
private final java.lang.Runnable afterTransformationHook
-
-
Constructor Detail
-
FieldVisibilitySchemaTransformation
public FieldVisibilitySchemaTransformation(VisibleFieldPredicate visibleFieldPredicate)
-
FieldVisibilitySchemaTransformation
public FieldVisibilitySchemaTransformation(VisibleFieldPredicate visibleFieldPredicate, java.lang.Runnable beforeTransformationHook, java.lang.Runnable afterTransformationHook)
-
-
Method Detail
-
apply
public final GraphQLSchema apply(GraphQLSchema schema)
-
getChildrenFn
private java.util.function.Function<GraphQLSchemaElement,java.util.List<GraphQLSchemaElement>> getChildrenFn(GraphQLSchema schema)
-
removeUnreferencedTypes
private GraphQLSchema removeUnreferencedTypes(java.util.Set<GraphQLType> markedForRemovalTypes, GraphQLSchema connectedSchema)
-
getRootTypes
private java.util.List<GraphQLSchemaElement> getRootTypes(GraphQLSchema schema)
-
getOperationTypes
private java.util.List<GraphQLObjectType> getOperationTypes(GraphQLSchema schema)
-
-