graphql
17.1.0 · 4 Nov 2026MIT74.5M / weekRepositorynpmAtom feed
16.15.0 is the newest release of 16.x.
In short
34 breaking1 removed3 deprecated27 new24 fixed73 changed119 internal
- Breaking
Remove 'GraphQLSchema::isPossibleType' that was previously deprecated (@IvanGoncharov)
- Breaking
Remove deprecated {GraphQLEnumValue, GraphQLField}::isDeprecated (@IvanGoncharov)
- Breaking
Remove support for positional args in graphql/execute/subscribe func (@IvanGoncharov)
- Breaking
resolveType: Remove support for returning GraphQLObjectType (@IvanGoncharov)
- Breaking
Remove 'isFinite' & 'isInteger' polyfills (@IvanGoncharov)
- Breaking
Drop support for TS before 3.7 (@IvanGoncharov)
- Breaking
Replace default exports with named exports (@IvanGoncharov)
- Breaking
Remove polyfills for 'Object.values' & 'Object.entries' (@IvanGoncharov)
Release note
Breaking Change
- Breaking
Remove 'GraphQLSchema::isPossibleType' that was previously deprecated (@IvanGoncharov)
- Breaking
Remove deprecated {GraphQLEnumValue, GraphQLField}::isDeprecated (@IvanGoncharov)
- Breaking
Remove support for positional args in graphql/execute/subscribe func (@IvanGoncharov)
- Breaking
resolveType: Remove support for returning GraphQLObjectType (@IvanGoncharov)
- Breaking
Remove 'isFinite' & 'isInteger' polyfills (@IvanGoncharov)
- Breaking
Drop support for TS before 3.7 (@IvanGoncharov)
- Breaking
Replace default exports with named exports (@IvanGoncharov)
- Breaking
Remove polyfills for 'Object.values' & 'Object.entries' (@IvanGoncharov)
- Breaking
Drop support for Node10 (@IvanGoncharov)
- Breaking
visitor: Remove
visitorKeysargument (@IvanGoncharov) - Breaking
visit: Remove template arguments for possible nodes (@IvanGoncharov)
- Breaking
Forbid null & undefined as return value of 'interfaces' thunk (@IvanGoncharov)
- Breaking
Convert Thunk to ThunkArray and ThunkObjMap (@saihaj)
- Breaking
visitor: Remove 4th form of visitor (@IvanGoncharov)
- Breaking
print/printSchema: Remove trailing new line (@IvanGoncharov)
- Breaking
TS: Use
unknown(TS) formixed(flow) (@saihaj) - Breaking
ts: Switch extension values to unknown to match Flow types (@IvanGoncharov)
- Breaking
subscribe: Drop mapping of AsyncIterable errors (@IvanGoncharov)
- Breaking
Drop Node v15 (@IvanGoncharov)
- Breaking
Drop support for TS 3.7 (@IvanGoncharov)
- Breaking
TS: Drop template argument from GraphQLFormattedError (@IvanGoncharov)
- Breaking
Synchronise
*.d.tswith sources converted to TS (@IvanGoncharov) - Breaking
execute: Forbid to return
nullfromserializefunction (@IvanGoncharov) - Breaking
execute: Forbid to return
nullfromserializefunction (@IvanGoncharov) - Breaking
Bring
visitorKeysback (@ardatan) - Breaking
Error.toStringTag change return string from 'Object' to 'GraphQLError' (@IvanGoncharov)
- Breaking
visitor: Speed up visitInParallel by dropping support for unknown nodes (@IvanGoncharov)
- Breaking
isNode: Check exact value of node's
kind(@IvanGoncharov) - Breaking
validation: Restrict maximum number of errors to 100 by default (@IvanGoncharov)
- Breaking
Move validation of names into
GraphQL*constructors (@IvanGoncharov) - Breaking
GraphQLError: Use enumerable properties (@IvanGoncharov)
- Breaking
Convert const "enum-like" maps to TS enums (@IvanGoncharov)
- Breaking
Add message that we only support TS >= 4.1.0 (@IvanGoncharov)
- Breaking
GraphQLError: Enumerate only spec prescribed properties (@IvanGoncharov)
- Breaking
GraphQLField: Relax default value of TArgs to
any(@IvanGoncharov)
Deprecation
- Deprecated
Deprecate 'graphql/subscriptions' and move code to 'execution' (@yaacovCR)
New Feature
print: Remove indentation inside of block strings (@IvanGoncharov)
extensionASTNodes: Always populate with empty array (@IvanGoncharov)
Refine getNamedType() for Input and Output types (@leebyron)
RFC: Support full Unicode in lexer (@leebyron)
parser: Add specialized error for extension with descriptions (@IvanGoncharov)
- Deprecated
Deprecate 'formatError' and added 'GraphQLError.toJSON' instead (@IvanGoncharov)
collectFields/collectSubfields cleanup prototype (@IvanGoncharov)
- Deprecated
Added 'GraphQLSchema.getRootType' and deprecate
getOperationRootType(@IvanGoncharov) language: Change OperationTypeNode to enum (@lekoaf)
GraphQLError: Keep extensions always present (@IvanGoncharov)
Change type of error extensions from anonymous Record to named interfaces (@IvanGoncharov)
Bug Fix
introspectionFromSchema: Enable 'specifiedByUrl' by default (@IvanGoncharov)
introspection: Add missing support for deprecated input values (@IvanGoncharov)
separateOperations: Distinguish query and fragment names (@IvanGoncharov)
RFC: Assert subscription field is not introspection. (@benjie)
ASTVisitor: Use type intersection instead of type union (@IvanGoncharov)
Synchronise TS typings for graphql.js/execute.js/subscribe.js (@IvanGoncharov)
Update introspection types (@saihaj)
Discrepancies between Flow and TS types (@saihaj)
TS: Use proper type for async generator (@saihaj)
definition.d.ts: Correct types (@IvanGoncharov)
Disallow "true", "false", and "null" as enum values (@Yogu)
Parser: Allow classes that extend Parser to access the instance attributes (@n1ru4l)
Preserve
deprecationReasononGraphQLInputFields (@trevor-scheer)type/introspection: Add missing
__Directive.args(includeDeprecated:)(@IvanGoncharov)lexer: Fix expression to decode surrogate pairs (@Cito)
execute: Correctly report missing root type error (@IvanGoncharov)
GraphQLError: Fix empty
locationsif error got nodes without locations (@IvanGoncharov)version: Force proper typing on version literals (@IvanGoncharov)
Docs
5 PRs were merged
Polish
119 PRs were merged
separateOperations-test: Refactor tests to look like snapshots (@IvanGoncharov)
Type annotation cannot appear on a constructor declaration (@saihaj)
No need to mark param optional if default value is given (@saihaj)
printer: Remove 'addDescription' wrapper (@IvanGoncharov)
printer: Use
wraputil function in more places (@IvanGoncharov)VariablesAreInputTypesRule: Remove incorrect return type (@IvanGoncharov)
schema-test: Use chai's
keysinstead of undocumentedkey(@IvanGoncharov)validateSchema: Inline 'getAllNodes' function (@IvanGoncharov)
inspect: Improve typings for
toJSONcall (@IvanGoncharov)valueFromAST-test: Correct typings (@IvanGoncharov)
scalars-test: Improve typings of function calls (@IvanGoncharov)
type-validate: Inline getAllNodes function (@IvanGoncharov)
buildClientSchema-test: Correctly wrap test case (@IvanGoncharov)
printer: Simplify printing of query short form (@IvanGoncharov)
Simplified memoize3 and improve type checking (@IvanGoncharov)
parser: Improve type checking of 'parseTypeReference' function (@IvanGoncharov)
blockString-fuzz: Improve
lexValuetyping (@IvanGoncharov)flow: Improve typings of exported definitions (@IvanGoncharov)
dedent-test: Change test data to pass spell check (@IvanGoncharov)
printSourceLocation: Simplifying by using
padStart(@IvanGoncharov)Switch
indexOftoincludeswhenever possible (@IvanGoncharov)flow: Improve typings for exported definitions (@IvanGoncharov)
introspection-test: Fix test to correctly check for exceptions (@IvanGoncharov)
Simplify testing AST nodes in buildSchema/extendedSchema tests (@IvanGoncharov)
Add types for internal Parser class (@saihaj)
GraphQLGrammarType: No need to code in
d.tscan just export type (@saihaj)ts: Switch to use ObjMap utility type (@saihaj)
ESLint: Enable 'func-names' (@IvanGoncharov)
testUtils: Refactor out dedentString from dedent (@saihaj)
mapAsyncIterator: Add default value for 'rejectCallback' (@IvanGoncharov)
mapAsyncIterator: Allow 'rejectCallback' to only be synchronous (@IvanGoncharov)
mapAsyncIterator: Simplify mapResult (@IvanGoncharov)
mapAsyncIterator: Simplify abruptClose (@IvanGoncharov)
printer-test: Switch to dedentString (@IvanGoncharov)
printer-test: Do more check on kitchen sink tests (@IvanGoncharov)
memoize3: Remove unnecessary
mixedtype (@IvanGoncharov)predicate-test: Improve typecheck (@IvanGoncharov)
subscribe: Simplify by rewriting as async functions (@IvanGoncharov)
subscribe: Simplify root field extraction (@IvanGoncharov)
Switch some of 'Object.keys' to more modern ES6 constructs (@IvanGoncharov)
mapAsyncIterator: Move promise resolution into
mapResult(@IvanGoncharov)visitor-test: Cleanup test for nodes with unknown kinds (@IvanGoncharov)
printSchema: Replace array concat with spead + update comment (@IvanGoncharov)
TS: Improve types mapAsyncIterator-test (@saihaj)
Generalize defineArguments() (@leebyron)
subscribe-test: General cleanup and simplify test setups (@IvanGoncharov)
mapAsyncIterator: Refactor async iterator (@IvanGoncharov)
mapAsyncIterator: Refactor async iterator (@IvanGoncharov)
mapAsyncIterator-test: Check that return value is passed on early return (@IvanGoncharov)
subscription-test: Use separate dummy query type (@IvanGoncharov)
subscription-test: Standardize generator names (@IvanGoncharov)
Flow: Add missing names to arguments of function types (@IvanGoncharov)
Improve naming 'err => error' and 'arr => array' (@IvanGoncharov)
dedent: Simplify implementation (@IvanGoncharov)
Flow: Replace force type conversion with explicit $FlowFixMe comments (@IvanGoncharov)
collectFields: Use ES6 collections instead of Object.create(null) (@IvanGoncharov)
execute: Inline collectAndExecuteSubfields function (@IvanGoncharov)
getFieldDef: Accept FieldNode instead of field name (@IvanGoncharov)
Flow: Switched to exact object by default (@IvanGoncharov)
Flow: Remove inferrable types (@IvanGoncharov)
Flow: Use only type imports for importing types (@IvanGoncharov)
mapAsyncIterator: Simplify test case (@IvanGoncharov)
OverlappingFieldsCanBeMergedRule: Refactor 'PairSet' (@IvanGoncharov)
Flow: Add missing arg name in function type (@IvanGoncharov)
Flow: Remove unnecessary '%checks' (@IvanGoncharov)
getLocation: Use more explicit
matchAllinstead ofRegExp.exec(@IvanGoncharov)OverlappingFieldsCanBeMergedRule: Futher simplify 'PairSet' (@IvanGoncharov)
TS: Switch all imports to type imports (@IvanGoncharov)
subscription-test: Add missing await (@IvanGoncharov)
valueFromAST: Drop unnecessary 'void' since
mixedalready includes it (@IvanGoncharov)visitor: Convert arguments descriptions to JSDoc comments (@IvanGoncharov)
src/type: Correct order of import/exports (@IvanGoncharov)
TypeInfo: Use explicit type for
getFieldDefarg (@IvanGoncharov)definition: Remove deprecation comment (@IvanGoncharov)
coerceInputValue: Add missing argument in function call (@IvanGoncharov)
execute: Rename resolveField function and update comments (@yaacovCR)
versions-test: Add support for experimental pre-releases (@IvanGoncharov)
SingleFieldSubscriptionsRule-test: Extract test schema from harness (@IvanGoncharov)
SingleFieldSubscriptionsRule: Fix order of imports (@IvanGoncharov)
TypeInfo-test: Remove dependency on harness schema for validation tests (@IvanGoncharov)
KnownDirectivesRule-test: Remove dependency on harness schema (@IvanGoncharov)
kitchenSinkQuery: Add '@onVariableDefinition' directive (@IvanGoncharov)
KnownDirectivesRule-test: Add tests for missing directive locations (@IvanGoncharov)
Simplify validation harness by extracting union types into approriate… (@IvanGoncharov)
Switch tests & internal funcs to accept ReadonlyArrays (@IvanGoncharov)
instanceOf: Add additional tests (@IvanGoncharov)
lexer: Remove superfluous statement in
readDigits(@Cito)ESLint: Enable some of the rules previously blocked by TS conversion (@IvanGoncharov)
VariablesAreInputTypesRule: Add test for ignoring unknown types (@IvanGoncharov)
assertValidName: Share character classes with lexer (@IvanGoncharov)
Reuse
groupByin validation rules (@IvanGoncharov)Move deprecated
SubscriptionArgsto 'src/subscription' (@IvanGoncharov)expectJSON: Return custom object instead of
expect(@IvanGoncharov)Lexer: Use standard JS functions to handle Unicode (@IvanGoncharov)
GraphQLError-test: Merge check of source with rest of the properties (@IvanGoncharov)
GraphQLError: Add test to check order of fields in JSON.stringify (@IvanGoncharov)
version-test: Fix validation of
versionInfo.preReleaseTag(@IvanGoncharov)
Internal
59 PRs were merged
- Removed
Remove deprecated
rmdirSyncusage from internal scripts (@IvanGoncharov) Add
.d.tsfor jsutils (@saihaj)Broken link to prettier rules (@saihaj)
Dependency
20 PRs were merged
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.