Package graphql

Class GraphQLUnusualConfiguration.ParserConfig

java.lang.Object
graphql.GraphQLUnusualConfiguration.ParserConfig
Enclosing class:
GraphQLUnusualConfiguration

public static class GraphQLUnusualConfiguration.ParserConfig extends Object
  • Field Details

  • Method Details

    • getDefaultParserOptions

      public ParserOptions getDefaultParserOptions()
      By default, the Parser will not capture ignored characters. A static holds this default value in a JVM wide basis options object.

      Significant memory savings can be made if we do NOT capture ignored characters, especially in SDL parsing.

      Returns:
      the static default JVM value
      See Also:
    • setDefaultParserOptions

      public GraphQLUnusualConfiguration.ParserConfig setDefaultParserOptions(ParserOptions options)
      By default, the Parser will not capture ignored characters. A static holds this default value in a JVM wide basis options object.

      Significant memory savings can be made if we do NOT capture ignored characters, especially in SDL parsing. So we have set this to false by default.

      This static can be set to true to allow the behavior of version 16.x or before.

      Parameters:
      options - - the new default JVM parser options
      See Also:
    • getDefaultOperationParserOptions

      public ParserOptions getDefaultOperationParserOptions()
      By default, for operation parsing, the Parser will not capture ignored characters, and it will not capture line comments into AST elements . A static holds this default value for operation parsing in a JVM wide basis options object.
      Returns:
      the static default JVM value for operation parsing
      See Also:
    • setDefaultOperationParserOptions

      public GraphQLUnusualConfiguration.ParserConfig setDefaultOperationParserOptions(ParserOptions options)
      By default, the Parser will not capture ignored characters or line comments. A static holds this default value in a JVM wide basis options object for operation parsing.

      This static can be set to true to allow the behavior of version 16.x or before.

      Parameters:
      options - - the new default JVM parser options for operation parsing
      See Also:
    • getDefaultSdlParserOptions

      public ParserOptions getDefaultSdlParserOptions()
      By default, for SDL parsing, the Parser will not capture ignored characters, but it will capture line comments into AST elements. The SDL default options allow unlimited tokens and whitespace, since a DOS attack vector is not commonly available via schema SDL parsing.

      A static holds this default value for SDL parsing in a JVM wide basis options object.

      Returns:
      the static default JVM value for SDL parsing
      See Also:
    • setDefaultSdlParserOptions

      public GraphQLUnusualConfiguration.ParserConfig setDefaultSdlParserOptions(ParserOptions options)
      By default, for SDL parsing, the Parser will not capture ignored characters, but it will capture line comments into AST elements . A static holds this default value for operation parsing in a JVM wide basis options object.

      This static can be set to true to allow the behavior of version 16.x or before.

      Parameters:
      options - - the new default JVM parser options for SDL parsing
      See Also:
    • then

      Returns:
      an element that allows you to chain multiple configuration elements