graphql.kickstart.execution.config.DefaultGraphQLSchemaProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-kickstart-javax Show documentation
Show all versions of graphql-java-kickstart-javax Show documentation
relay.js-compatible GraphQL servlet
The newest version!
package graphql.kickstart.execution.config;
import graphql.schema.GraphQLSchema;
/** @author Andrew Potter */
public class DefaultGraphQLSchemaProvider implements GraphQLSchemaProvider {
private final GraphQLSchema schema;
private final GraphQLSchema readOnlySchema;
public DefaultGraphQLSchemaProvider(GraphQLSchema schema) {
this(schema, GraphQLSchemaProvider.copyReadOnly(schema));
}
public DefaultGraphQLSchemaProvider(GraphQLSchema schema, GraphQLSchema readOnlySchema) {
this.schema = schema;
this.readOnlySchema = readOnlySchema;
}
@Override
public GraphQLSchema getSchema() {
return schema;
}
@Override
public GraphQLSchema getReadOnlySchema() {
return readOnlySchema;
}
}