graphql.kickstart.servlet.AbstractGraphQLInvocationInputParser 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;
import graphql.kickstart.execution.GraphQLObjectMapper;
import graphql.kickstart.execution.context.ContextSetting;
import graphql.kickstart.servlet.input.GraphQLInvocationInputFactory;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
abstract class AbstractGraphQLInvocationInputParser implements GraphQLInvocationInputParser {
final GraphQLInvocationInputFactory invocationInputFactory;
final GraphQLObjectMapper graphQLObjectMapper;
final ContextSetting contextSetting;
boolean isSingleQuery(String query) {
return query != null && !query.trim().isEmpty() && !query.trim().startsWith("[");
}
boolean isBatchedQuery(String query) {
return query != null && !query.trim().isEmpty() && query.trim().startsWith("[");
}
}