graphql-js icon indicating copy to clipboard operation
graphql-js copied to clipboard

A reference implementation of GraphQL for JavaScript

Results 322 graphql-js issues
Sort by recently updated
recently updated
newest added

Context #3282 by @spawnia It looks like we have the following mismatch between spec and graphql-js. For example, type names are checked using this rule: https://github.com/graphql/graphql-js/blob/main/src/validation/rules/KnownTypeNamesRule.ts But in spec, there...

needs exploration

This PR implements graphql/graphql-spec#825 to add a `@oneOf` directive that indicates ~~an Object is a OneOf Object or~~ an Input Object is a OneOf Input Object. We then validate ~~OneOf...

`getIntrospectionQuery` only requests the `name` field from the root `queryType` object (https://github.com/graphql/graphql-js/blob/6e48d16f92b9a6df8638b1486354c6be2537033b/src/utilities/getIntrospectionQuery.ts) ``` queryType { name } ``` yet the `IntrospectionQuery` datatype defines `queryType` as `IntrospectionNamedTypeRef` (https://github.com/graphql/graphql-js/blob/main/src/utilities/getIntrospectionQuery.ts#L167) which requires `kind`...

See: https://github.com/graphql/graphql-spec/pull/939

spec RFC

Currently, Prettier doing a way better job at formating GraphQL documents than our own `print` we should learn more on how they handle the different cases and copy everything that...

enhancement

This code lines https://github.com/graphql/graphql-js/blob/16009cbcb0109da03f2157a868817b886801095a/src/error/GraphQLError.js#L189-L196 cause serious performance degradation in case of node used with sourcemaps. For example dataloader fail on reading list of N nodes can cause N*100ms delay. Explanation:...

The `parseLiteral` method of scalar and enum types expects the `variables` as second argument (see the definition of the [GraphQLScalarLiteralParser](https://github.com/graphql/graphql-js/blob/1fd47c9d032e2ed03320aca7e21767c7cc6de0a3/src/type/definition.js#L671) type). This argument is passed in [valueFromAST](https://github.com/graphql/graphql-js/blob/1fd47c9d032e2ed03320aca7e21767c7cc6de0a3/src/utilities/valueFromAST.js#L141). However, the standard...

needs exploration

Optional arguments and parameters should not use the maybe type except where passing in a null value is semantically different from passing in an undefined value. So ``` operationName?: ?string...

enhancement

Here is a stack trace I recently got: Error: Cannot return null for non-nullable field User.id. at completeValue (/home/me/projects/my-project/server/node_modules/graphql/execution/execute.js:560:13) at completeValueCatchingError (/home/me/projects/my-project/server/node_modules/graphql/execution/execute.js:495:19) at resolveField (/home/me/projects/my-project/server/node_modules/graphql/execution/execute.js:435:10) at executeFields (/home/me/projects/my-project/server/node_modules/graphql/execution/execute.js:275:18) at collectAndExecuteSubfields...

enhancement

At [XING](https://www.xing.com) we are using the [Sangria](https://sangria-graphql.org) implementation of GraphQL. The implementation of the OverlappingFieldsCanBeMerged validation in Sangria follows the one in this reference implementation. We experienced performance problems with...

enhancement