Skip to content

Commit fc3ed54

Browse files
committed
Merge branch 'master' of https://github.com/nveenjain/graphql-js into feature/addCommentInAST
Signed-off-by: Naveen Jain <[email protected]>
2 parents 5a5825c + 688f93c commit fc3ed54

File tree

14 files changed

+317
-295
lines changed

14 files changed

+317
-295
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ overrides:
433433
flowtype/require-valid-file-annotation: off
434434

435435
##########################################################################
436-
# `@typescript-eslint/eslint-plugin` rule list based on `v2.17.x`
436+
# `@typescript-eslint/eslint-plugin` rule list based on `v2.21.x`
437437
##########################################################################
438438

439439
# Supported Rules

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)?)\\)
4040
suppress_comment=\\(.\\|\n\\)*\\$DisableFlowOnNegativeTest
4141

4242
[version]
43-
^0.118.0
43+
^0.119.0

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@
4444
},
4545
"dependencies": {},
4646
"devDependencies": {
47-
"@babel/core": "7.8.4",
47+
"@babel/core": "7.8.6",
4848
"@babel/plugin-transform-flow-strip-types": "7.8.3",
49-
"@babel/preset-env": "7.8.4",
50-
"@babel/register": "7.8.3",
51-
"@typescript-eslint/eslint-plugin": "2.19.2",
52-
"@typescript-eslint/parser": "2.19.2",
53-
"babel-eslint": "10.0.3",
49+
"@babel/preset-env": "7.8.6",
50+
"@babel/register": "7.8.6",
51+
"@typescript-eslint/eslint-plugin": "2.21.0",
52+
"@typescript-eslint/parser": "2.21.0",
53+
"babel-eslint": "10.1.0",
5454
"chai": "4.2.0",
55-
"cspell": "4.0.46",
56-
"dtslint": "2.0.6",
55+
"cspell": "4.0.55",
56+
"dtslint": "3.2.0",
5757
"eslint": "6.8.0",
5858
"eslint-plugin-flowtype": "4.6.0",
5959
"eslint-plugin-import": "2.20.1",
60-
"flow-bin": "0.118.0",
61-
"mocha": "7.0.1",
60+
"flow-bin": "0.119.1",
61+
"mocha": "7.1.0",
6262
"nyc": "15.0.0",
6363
"prettier": "1.19.1",
64-
"typescript": "^3.7.5"
64+
"typescript": "^3.8.3"
6565
}
6666
}

src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Each sub directory within is a sub-module of graphql-js:
1717
fulfilling a GraphQL result.
1818
- [`graphql/execution`](execution/README.md): The Execution phase of fulfilling
1919
a GraphQL request.
20-
- [`graphql/error`](error/README.md): Creating and formating GraphQL errors.
20+
- [`graphql/error`](error/README.md): Creating and formatting GraphQL errors.
2121
- [`graphql/utilities`](utilities/README.md): Common useful computations upon
2222
the GraphQL language and type objects.
2323
- [`graphql/subscription`](subscription/README.md): Subscribe to data updates.

src/__tests__/graphql-test.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/execution/__tests__/sync-test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ describe('Execute: synchronously when possible', () => {
9393
});
9494

9595
describe('graphqlSync', () => {
96+
it('report errors raised during schema validation', () => {
97+
const badSchema = new GraphQLSchema({});
98+
const result = graphqlSync({
99+
schema: badSchema,
100+
source: '{ __typename }',
101+
});
102+
expect(result).to.deep.equal({
103+
errors: [{ message: 'Query root type must be provided.' }],
104+
});
105+
});
106+
96107
it('does not return a Promise for syntax errors', () => {
97108
const doc = 'fragment Example on Query { { { syncField }';
98109
const result = graphqlSync({

src/language/lexer.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Token } from './ast';
1+
import { Token, CommentNode } from './ast';
22
import { Source } from './source';
33

44
/**

src/type/definition.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export interface GraphQLField<
517517
args: Array<GraphQLArgument>;
518518
resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>;
519519
subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs>;
520-
isDeprecated?: boolean;
520+
isDeprecated: boolean;
521521
deprecationReason?: Maybe<string>;
522522
extensions: Maybe<Readonly<Record<string, any>>>;
523523
astNode?: Maybe<FieldDefinitionNode>;
@@ -739,7 +739,7 @@ export interface GraphQLEnumValue {
739739
name: string;
740740
description: Maybe<string>;
741741
value: any;
742-
isDeprecated?: boolean;
742+
isDeprecated: boolean;
743743
deprecationReason: Maybe<string>;
744744
extensions: Maybe<Readonly<Record<string, any>>>;
745745
astNode?: Maybe<EnumValueDefinitionNode>;

src/type/definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ export type GraphQLField<
967967
args: Array<GraphQLArgument>,
968968
resolve?: GraphQLFieldResolver<TSource, TContext, TArgs>,
969969
subscribe?: GraphQLFieldResolver<TSource, TContext, TArgs>,
970-
isDeprecated?: boolean,
970+
isDeprecated: boolean,
971971
deprecationReason: ?string,
972972
extensions: ?ReadOnlyObjMap<mixed>,
973973
astNode: ?FieldDefinitionNode,

src/type/introspection.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ export const SchemaMetaFieldDef: GraphQLField<mixed, mixed> = {
457457
description: 'Access the current type schema of this server.',
458458
args: [],
459459
resolve: (_source, _args, _context, { schema }) => schema,
460+
isDeprecated: false,
460461
deprecationReason: undefined,
461462
extensions: undefined,
462463
astNode: undefined,
@@ -477,6 +478,7 @@ export const TypeMetaFieldDef: GraphQLField<mixed, mixed> = {
477478
},
478479
],
479480
resolve: (_source, { name }, _context, { schema }) => schema.getType(name),
481+
isDeprecated: false,
480482
deprecationReason: undefined,
481483
extensions: undefined,
482484
astNode: undefined,
@@ -488,6 +490,7 @@ export const TypeNameMetaFieldDef: GraphQLField<mixed, mixed> = {
488490
description: 'The name of the current Object type at runtime.',
489491
args: [],
490492
resolve: (_source, _args, _context, { parentType }) => parentType.name,
493+
isDeprecated: false,
491494
deprecationReason: undefined,
492495
extensions: undefined,
493496
astNode: undefined,

0 commit comments

Comments
 (0)