-
- All Implemented Interfaces:
public final class ParserOptions
Configure options for parsing GraphQL queries and schema definition language documents. Settings here override the defaults set by GraphQL Java.
-
-
Field Summary
Fields Modifier and Type Field Description private Integer
maxTokens
private Integer
maxWhitespaceTokens
private Boolean
captureIgnoredChars
private Boolean
captureLineComments
private Boolean
captureSourceLocation
-
Constructor Summary
Constructors Constructor Description ParserOptions()
-
Method Summary
Modifier and Type Method Description final Integer
getMaxTokens()
Modify the maximum number of tokens read to prevent processing extremely large queries final Unit
setMaxTokens(@Parameter() Integer maxTokens)
Modify the maximum number of tokens read to prevent processing extremely large queries final Integer
getMaxWhitespaceTokens()
Modify the maximum number of whitespace tokens read to prevent processing extremely large queries final Unit
setMaxWhitespaceTokens(@Parameter() Integer maxWhitespaceTokens)
Modify the maximum number of whitespace tokens read to prevent processing extremely large queries final Boolean
getCaptureIgnoredChars()
Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing. final Unit
setCaptureIgnoredChars(@Parameter() Boolean captureIgnoredChars)
Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing. final Boolean
getCaptureLineComments()
Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored final Unit
setCaptureLineComments(@Parameter() Boolean captureLineComments)
Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored final Boolean
getCaptureSourceLocation()
Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing. final Unit
setCaptureSourceLocation(@Parameter() Boolean captureSourceLocation)
Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing. -
-
Method Detail
-
getMaxTokens
final Integer getMaxTokens()
Modify the maximum number of tokens read to prevent processing extremely large queries
-
setMaxTokens
final Unit setMaxTokens(@Parameter() Integer maxTokens)
Modify the maximum number of tokens read to prevent processing extremely large queries
-
getMaxWhitespaceTokens
final Integer getMaxWhitespaceTokens()
Modify the maximum number of whitespace tokens read to prevent processing extremely large queries
-
setMaxWhitespaceTokens
final Unit setMaxWhitespaceTokens(@Parameter() Integer maxWhitespaceTokens)
Modify the maximum number of whitespace tokens read to prevent processing extremely large queries
-
getCaptureIgnoredChars
final Boolean getCaptureIgnoredChars()
Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing.
-
setCaptureIgnoredChars
final Unit setCaptureIgnoredChars(@Parameter() Boolean captureIgnoredChars)
Memory usage is significantly reduced by not capturing ignored characters, especially in SDL parsing.
-
getCaptureLineComments
final Boolean getCaptureLineComments()
Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored
-
setCaptureLineComments
final Unit setCaptureLineComments(@Parameter() Boolean captureLineComments)
Single-line comments do not have any semantic meaning in GraphQL source documents and can be ignored
-
getCaptureSourceLocation
final Boolean getCaptureSourceLocation()
Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing.
-
setCaptureSourceLocation
final Unit setCaptureSourceLocation(@Parameter() Boolean captureSourceLocation)
Memory usage is reduced by not setting SourceLocations on AST nodes, especially in SDL parsing.
-
-
-
-