@PublicApi public class GraphQLSchema extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLSchema.Builder |
Constructor and Description |
---|
GraphQLSchema(GraphQLObjectType queryType)
Deprecated.
use the
newSchema() builder pattern instead, as this constructor will be made private in a future version. |
GraphQLSchema(GraphQLObjectType queryType,
GraphQLObjectType mutationType,
GraphQLObjectType subscriptionType,
Set<GraphQLType> additionalTypes)
Deprecated.
use the
newSchema() builder pattern instead, as this constructor will be made private in a future version. |
GraphQLSchema(GraphQLObjectType queryType,
GraphQLObjectType mutationType,
Set<GraphQLType> additionalTypes)
Deprecated.
use the
newSchema() builder pattern instead, as this constructor will be made private in a future version. |
@Deprecated public GraphQLSchema(GraphQLObjectType queryType)
newSchema()
builder pattern instead, as this constructor will be made private in a future version.queryType
- the query type@Deprecated public GraphQLSchema(GraphQLObjectType queryType, GraphQLObjectType mutationType, Set<GraphQLType> additionalTypes)
newSchema()
builder pattern instead, as this constructor will be made private in a future version.queryType
- the query typemutationType
- the mutation typeadditionalTypes
- additional types@Deprecated public GraphQLSchema(GraphQLObjectType queryType, GraphQLObjectType mutationType, GraphQLObjectType subscriptionType, Set<GraphQLType> additionalTypes)
newSchema()
builder pattern instead, as this constructor will be made private in a future version.queryType
- the query typemutationType
- the mutation typesubscriptionType
- the subscription typeadditionalTypes
- additional typespublic GraphQLCodeRegistry getCodeRegistry()
public Set<GraphQLType> getAdditionalTypes()
public GraphQLType getType(String typeName)
public GraphQLObjectType getObjectType(String typeName)
GraphQLObjectType
from the schematypeName
- the name of the typeGraphQLException
- if the type is NOT a object typepublic Map<String,GraphQLType> getTypeMap()
public List<GraphQLType> getAllTypesAsList()
public List<GraphQLObjectType> getImplementations(GraphQLInterfaceType type)
GraphQLObjectType
types that implement the given
interface type.type
- interface type to obtain implementations of.public boolean isPossibleType(GraphQLType abstractType, GraphQLObjectType concreteType)
abstractType
- abstract type either interface or unionconcreteType
- concrete typepublic GraphQLObjectType getQueryType()
public GraphQLObjectType getMutationType()
public GraphQLObjectType getSubscriptionType()
@Deprecated public GraphqlFieldVisibility getFieldVisibility()
GraphQLCodeRegistry.getFieldVisibility()
insteadpublic List<GraphQLDirective> getDirectives()
public GraphQLDirective getDirective(String name)
public boolean isSupportingMutations()
public boolean isSupportingSubscriptions()
public GraphQLSchema transform(Consumer<GraphQLSchema.Builder> builderConsumer)
builderConsumer
- the consumer code that will be given a builder to transformpublic static GraphQLSchema.Builder newSchema()
public static GraphQLSchema.Builder newSchema(GraphQLSchema existingSchema)
existingSchema
- the existing schemaCopyright © 2019. All rights reserved.