graphql-js
bb8e5743 - polish(ast): prefer undefined over empty arrays (#4206)

Comment changes are shownComment changes are hidden
Commit
210 days ago
polish(ast): prefer undefined over empty arrays (#4206) see: https://github.com/graphql/graphql-js/pull/2405#issuecomment-579077133 Manually created ASTs always allowed undefined in place of empty arrays; this change simply updates the parser to more closely follow the manual approach. This is therefore not technically a breaking change, but considering that there may be tools not aware of this, we have labelled it a BREAKING_CHANGE to highlight it for consumers. This closes #2203 as our tests now cover the undefined case by default whenever there is an empty array.
Author
Parents
  • src
    • execution
      • File
        execute.ts
      • File
        values.ts
    • language
      • __tests__
        • File
          parser-test.ts
        • File
          schema-parser-test.ts
      • File
        parser.ts
      • File
        printer.ts
    • type
      • __tests__
        • File
          validation-test.ts
      • File
        validate.ts
    • utilities
      • __tests__
        • File
          buildASTSchema-test.ts
        • File
          coerceInputValue-test.ts
        • File
          replaceVariables-test.ts
      • File
        extendSchema.ts
    • validation/rules
      • File
        KnownArgumentNamesRule.ts
      • File
        NoUnusedVariablesRule.ts
      • File
        OverlappingFieldsCanBeMergedRule.ts
      • File
        ProvidedRequiredArgumentsRule.ts
      • File
        UniqueArgumentDefinitionNamesRule.ts
      • File
        UniqueArgumentNamesRule.ts
      • File
        UniqueEnumValueNamesRule.ts
      • File
        UniqueFieldDefinitionNamesRule.ts
      • File
        UniqueOperationTypesRule.ts
      • File
        UniqueVariableNamesRule.ts