Skip to content

Commit eb01a23

Browse files
authored
Merge pull request graphql#1027 from APIs-guru/excuteArgs
Add missing ExecutionArgs export
2 parents b84b69f + 7086160 commit eb01a23

File tree

9 files changed

+13
-15
lines changed

9 files changed

+13
-15
lines changed

src/execution/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* @flow */
12
/**
23
* Copyright (c) 2015, Facebook, Inc.
34
* All rights reserved.
@@ -10,4 +11,4 @@
1011
export { execute, defaultFieldResolver, responsePathAsArray } from './execute';
1112
export { getDirectiveValues } from './values';
1213

13-
export type { ExecutionResult } from './execute';
14+
export type { ExecutionArgs, ExecutionResult } from './execute';

src/language/lexer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* @flow /
1+
/* @flow */
22
/**
33
* Copyright (c) 2015, Facebook, Inc.
44
* All rights reserved.

src/subscription/asyncIteratorReject.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
/* @flow */
12
/**
23
* Copyright (c) 2017, Facebook, Inc.
34
* All rights reserved.
45
*
56
* This source code is licensed under the BSD-style license found in the
67
* LICENSE file in the root directory of this source tree. An additional grant
78
* of patent rights can be found in the PATENTS file in the same directory.
8-
*
9-
* @flow
109
*/
1110

1211
import { $$asyncIterator } from 'iterall';

src/subscription/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
/* @flow */
12
/**
23
* Copyright (c) 2017, Facebook, Inc.
34
* All rights reserved.
45
*
56
* This source code is licensed under the BSD-style license found in the
67
* LICENSE file in the root directory of this source tree. An additional grant
78
* of patent rights can be found in the PATENTS file in the same directory.
8-
*
9-
* @flow
109
*/
1110

1211
export { subscribe, createSourceEventStream } from './subscribe';

src/subscription/mapAsyncIterator.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
/* @flow */
12
/**
23
* Copyright (c) 2017, Facebook, Inc.
34
* All rights reserved.
45
*
56
* This source code is licensed under the BSD-style license found in the
67
* LICENSE file in the root directory of this source tree. An additional grant
78
* of patent rights can be found in the PATENTS file in the same directory.
8-
*
9-
* @flow
109
*/
1110

1211
import { $$asyncIterator, getAsyncIterator } from 'iterall';

src/subscription/subscribe.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
/* @flow */
12
/**
23
* Copyright (c) 2017, Facebook, Inc.
34
* All rights reserved.
45
*
56
* This source code is licensed under the BSD-style license found in the
67
* LICENSE file in the root directory of this source tree. An additional grant
78
* of patent rights can be found in the PATENTS file in the same directory.
8-
*
9-
* @flow
109
*/
1110

1211
import { isAsyncIterable } from 'iterall';

src/validation/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* @flow */
12
/**
23
* Copyright (c) 2015, Facebook, Inc.
34
* All rights reserved.

src/validation/rules/KnownArgumentNames.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ import invariant from '../../jsutils/invariant';
1515
import suggestionList from '../../jsutils/suggestionList';
1616
import quotedOrList from '../../jsutils/quotedOrList';
1717
import * as Kind from '../../language/kinds';
18-
import type { GraphQLType } from '../../type/definition';
1918

2019

2120
export function unknownArgMessage(
2221
argName: string,
2322
fieldName: string,
24-
type: GraphQLType,
23+
typeName: string,
2524
suggestedArgs: Array<string>
2625
): string {
2726
let message = `Unknown argument "${argName}" on field "${fieldName}" of ` +
28-
`type "${String(type)}".`;
27+
`type "${typeName}".`;
2928
if (suggestedArgs.length) {
3029
message += ` Did you mean ${quotedOrList(suggestedArgs)}?`;
3130
}

src/validation/rules/PossibleFragmentSpreads.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import type { ValidationContext } from '../index';
1212
import { GraphQLError } from '../../error';
1313
import { doTypesOverlap } from '../../utilities/typeComparators';
1414
import { typeFromAST } from '../../utilities/typeFromAST';
15+
import { isCompositeType } from '../../type/definition';
1516
import type { GraphQLType } from '../../type/definition';
1617

1718

@@ -44,8 +45,8 @@ export function PossibleFragmentSpreads(context: ValidationContext): any {
4445
InlineFragment(node) {
4546
const fragType = context.getType();
4647
const parentType = context.getParentType();
47-
if (fragType &&
48-
parentType &&
48+
if (isCompositeType(fragType) &&
49+
isCompositeType(parentType) &&
4950
!doTypesOverlap(context.getSchema(), fragType, parentType)) {
5051
context.reportError(new GraphQLError(
5152
typeIncompatibleAnonSpreadMessage(parentType, fragType),

0 commit comments

Comments
 (0)