Package graphql.normalized
Class ExecutableNormalizedOperationFactory.Options
- java.lang.Object
-
- graphql.normalized.ExecutableNormalizedOperationFactory.Options
-
- Enclosing class:
- ExecutableNormalizedOperationFactory
public static class ExecutableNormalizedOperationFactory.Options extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private GraphQLContext
graphQLContext
private java.util.Locale
locale
private int
maxChildrenDepth
-
Constructor Summary
Constructors Modifier Constructor Description private
Options(GraphQLContext graphQLContext, java.util.Locale locale, int maxChildrenDepth)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExecutableNormalizedOperationFactory.Options
defaultOptions()
GraphQLContext
getGraphQLContext()
java.util.Locale
getLocale()
int
getMaxChildrenDepth()
ExecutableNormalizedOperationFactory.Options
graphQLContext(GraphQLContext graphQLContext)
Context object to use when parsing the operation.ExecutableNormalizedOperationFactory.Options
locale(java.util.Locale locale)
Locale to use when parsing the query.ExecutableNormalizedOperationFactory.Options
maxChildrenDepth(int maxChildrenDepth)
Controls the maximum depth of the operation.
-
-
-
Field Detail
-
graphQLContext
private final GraphQLContext graphQLContext
-
locale
private final java.util.Locale locale
-
maxChildrenDepth
private final int maxChildrenDepth
-
-
Constructor Detail
-
Options
private Options(GraphQLContext graphQLContext, java.util.Locale locale, int maxChildrenDepth)
-
-
Method Detail
-
defaultOptions
public static ExecutableNormalizedOperationFactory.Options defaultOptions()
-
locale
public ExecutableNormalizedOperationFactory.Options locale(java.util.Locale locale)
Locale to use when parsing the query.e.g. can be passed to
Coercing
for parsing.- Parameters:
locale
- the locale to use- Returns:
- new options object to use
-
graphQLContext
public ExecutableNormalizedOperationFactory.Options graphQLContext(GraphQLContext graphQLContext)
Context object to use when parsing the operation.Can be used to intercept input values e.g. using
InputInterceptor
.- Parameters:
graphQLContext
- the context to use- Returns:
- new options object to use
-
maxChildrenDepth
public ExecutableNormalizedOperationFactory.Options maxChildrenDepth(int maxChildrenDepth)
Controls the maximum depth of the operation. Can be used to prevent against malicious operations.- Parameters:
maxChildrenDepth
- the max depth- Returns:
- new options object to use
-
getGraphQLContext
public GraphQLContext getGraphQLContext()
- Returns:
- context to use during operation parsing
- See Also:
graphQLContext(GraphQLContext)
-
getLocale
public java.util.Locale getLocale()
- Returns:
- locale to use during operation parsing
- See Also:
locale(Locale)
-
getMaxChildrenDepth
public int getMaxChildrenDepth()
- Returns:
- maximum children depth before aborting parsing
- See Also:
maxChildrenDepth(int)
-
-