graphql 14.0.0
Thanks to all contributors for the hard work put into this release, which complies with the latest June 2018 version of the GraphQL Spec
Breaking:
- Drops support for node v4 and v9, makes sure node v10 is supported (#1338, #1445)
- Reject invalid scalar value coercion (#1365, #1336)
- Removes
VariablesDefaultValueAllowedvalidation rule, andProvidedNonNullArgumentsbecameProvidedRequiredArguments(#1274) - Stricter coercion of Scalar Types (#1382)
- Removes deprecated Introspection fields
onOperation,onFragment, andonField(#1385, #1429) GraphQL*Configare now exact types (#1391, #1443)- "Schema Change" keys in
BreakingChangeTypeandDangerousChangeTypefor detecting adding args and input fields changed name (#1492) formatErrorAPI changed for error message extensions. To upgrade without changing existing server responses, wrapgraphql'sformatError:
import { formatError as baseFormatError, /* ... */ } from 'graphql';
{
// other options
formatError(error) {
const { extensions, ...rest } = baseFormatError(error);
return { ...extensions, ...rest };
},
}
New:
- Parse new schema extensions (#1314, #1323)
- Export SDL AST types (#1315)
extendSchemaextended with spec-compliant SDL extensions (#1373, #1392, #1441)symbol.toStringTagsupport (#1297)- Expose
getOperationRootType(schema, operationAST)(#1345) - Package is marked as side-effect free (#1312)
validateSchemaworks with Schema extensions (#1410)validateworks on SDL definitions (#1438, #1383)- directives can be added to variable definitions, behind
experimentalVariableDefinitionDirectivesflag (#1437, #1454) - ASTNode predicates, like
isDefinitionNodeandisTypeSystemDefinitionNode(#1459) isRequiredArgumentandisRequiredInputFieldpredicates (#1463)
Fixed:
- Fixes for custom enum types
- Prettier, Flow and eslint upgrades (#1304, #1319)
- Babel 7 upgrade (#1350)
- Introspection query perf improved (#1329)
introspectionFromSchemahas default options (#1408)buildSchemamemory leaks and infinite recursion fixed (#1417, #1427)watchcommand fixed (#1449)- Benchmarking for
validation(#1471)
Deprecated:
These will be removed in v15
introspectionQuery, usegetIntrospectionQuery(#1386)getDescription, use the schema AST node to get descriptions (#1396)isValidJSValue, usecoerceValue(#1386)isValidLiteralValue, use validation (#1386)