graphql.kickstart.servlet.config.DefaultGraphQLSchemaServletProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-java-servlet Show documentation
Show all versions of graphql-java-servlet Show documentation
relay.js-compatible GraphQL servlet
package graphql.kickstart.servlet.config;
import graphql.kickstart.execution.config.DefaultGraphQLSchemaProvider;
import graphql.schema.GraphQLSchema;
import javax.servlet.http.HttpServletRequest;
import javax.websocket.server.HandshakeRequest;
/** @author Andrew Potter */
public class DefaultGraphQLSchemaServletProvider extends DefaultGraphQLSchemaProvider
implements GraphQLSchemaServletProvider {
public DefaultGraphQLSchemaServletProvider(GraphQLSchema schema) {
super(schema);
}
@Override
public GraphQLSchema getSchema(HttpServletRequest request) {
return getSchema();
}
@Override
public GraphQLSchema getSchema(HandshakeRequest request) {
return getSchema();
}
@Override
public GraphQLSchema getReadOnlySchema(HttpServletRequest request) {
return getReadOnlySchema();
}
}