/** * Types that can contain input fields are marked with this interface * * @see graphql.schema.GraphQLInputType */ @PublicApi public interface GraphQLInputFieldsContainer extends GraphQLType { GraphQLInputObjectField getFieldDefinition(String name); List<GraphQLInputObjectField> getFieldDefinitions(); }
/** * All Schema Definition Language (SDL) Definitions. * * @param <T> the actual Node type */ @PublicApi public interface SDLDefinition<T extends SDLDefinition> extends Definition<T> { }
@PublicApi public interface QueryVisitorInlineFragmentEnvironment { InlineFragment getInlineFragment(); TraverserContext<Node> getTraverserContext(); }
/** * Adapts an arbitrary class to behave as a node. * We are using an Adapter because we don't want to require Nodes to implement a certain Interface. * * @param <T> */ @PublicApi public interface NodeAdapter<T> { Map<String, List<T>> getNamedChildren(T node); T withNewChildren(T node, Map<String, List<T>> newChildren); T removeChild(T node, NodeLocation location); }
@PublicApi public class MapEnumValuesProvider implements EnumValuesProvider { private final Map<String, Object> values; public MapEnumValuesProvider(Map<String, Object> values) { Assert.assertNotNull(values, "values can't be null"); this.values = values; } @Override public Object getValue(String name) { return values.get(name); } }
/** * Used by {@link QueryTraversal} to visit the nodes of a Query. * <p> * How this happens in detail (pre vs post-order for example) is defined by {@link QueryTraversal}. */ @PublicApi public interface QueryVisitor { void visitField(QueryVisitorFieldEnvironment queryVisitorFieldEnvironment); void visitInlineFragment(QueryVisitorInlineFragmentEnvironment queryVisitorInlineFragmentEnvironment); void visitFragmentSpread(QueryVisitorFragmentSpreadEnvironment queryVisitorFragmentSpreadEnvironment); }
@PublicApi public interface QueryVisitorFragmentSpreadEnvironment { FragmentSpread getFragmentSpread(); FragmentDefinition getFragmentDefinition(); TraverserContext<Node> getTraverserContext(); }
@PublicApi public class InterfaceWiringEnvironment extends WiringEnvironment { private final InterfaceTypeDefinition interfaceTypeDefinition; InterfaceWiringEnvironment(TypeDefinitionRegistry registry, InterfaceTypeDefinition interfaceTypeDefinition) { super(registry); this.interfaceTypeDefinition = interfaceTypeDefinition; } public InterfaceTypeDefinition getInterfaceTypeDefinition() { return interfaceTypeDefinition; } }
@PublicApi public class QueryVisitorStub implements QueryVisitor { @Override public void visitField(QueryVisitorFieldEnvironment queryVisitorFieldEnvironment) { } @Override public void visitInlineFragment(QueryVisitorInlineFragmentEnvironment queryVisitorInlineFragmentEnvironment) { } @Override public void visitFragmentSpread(QueryVisitorFragmentSpreadEnvironment queryVisitorFragmentSpreadEnvironment) { } }
/** * All type definitions in a SDL. * * @param <T> the actual Node type */ @PublicApi public interface TypeDefinition<T extends TypeDefinition> extends SDLDefinition<T>, DirectivesContainer<T>, NamedNode<T> { }
@PublicApi public class UnionWiringEnvironment extends WiringEnvironment { private final UnionTypeDefinition unionTypeDefinition; UnionWiringEnvironment(TypeDefinitionRegistry registry, UnionTypeDefinition unionTypeDefinition) { super(registry); this.unionTypeDefinition = unionTypeDefinition; } public UnionTypeDefinition getUnionTypeDefinition() { return unionTypeDefinition; } }
/** * Represents a language node that has a name */ @PublicApi public interface NamedNode<T extends NamedNode> extends Node<T> { /** * @return the name of this node */ String getName(); }
/** * This is thrown if multiple operations are defined in the query and * the operation name is missing or there is no matching operation name * contained in the GraphQL query. */ @PublicApi public class UnknownOperationException extends GraphQLException { public UnknownOperationException(String message) { super(message); } }
@PublicApi public interface NodeBuilder { NodeBuilder sourceLocation(SourceLocation sourceLocation); NodeBuilder comments(List<Comment> comments); NodeBuilder ignoredChars(IgnoredChars ignoredChars); }
@PublicApi public class AssertException extends GraphQLException { public AssertException(String message) { super(message); } }
/** * Types that can contain output fields are marked with this interface * * @see graphql.schema.GraphQLObjectType * @see graphql.schema.GraphQLInterfaceType */ @PublicApi public interface GraphQLFieldsContainer extends GraphQLCompositeType { GraphQLFieldDefinition getFieldDefinition(String name); List<GraphQLFieldDefinition> getFieldDefinitions(); }
/** * Input types represent those set of types that are allowed to be accepted as graphql mutation input, as opposed * to {@link graphql.schema.GraphQLOutputType}s which can only be used as graphql response output. */ @PublicApi public interface GraphQLInputType extends GraphQLType { }
/** * Output types represent those set of types that are allowed to be sent back as a graphql response, as opposed * to {@link graphql.schema.GraphQLInputType}s which can only be used as graphql mutation input. */ @PublicApi public interface GraphQLOutputType extends GraphQLType { }
@PublicApi public interface ScalarValue<T extends Value> extends Value<T> { }
@PublicApi public interface NodeDirectivesBuilder extends NodeBuilder { NodeDirectivesBuilder directives(List<Directive> directives); }