Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/execution/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
Expand All @@ -10,4 +11,4 @@
export { execute, defaultFieldResolver, responsePathAsArray } from './execute';
export { getDirectiveValues } from './values';

export type { ExecutionResult } from './execute';
export type { ExecutionArgs, ExecutionResult } from './execute';
2 changes: 1 addition & 1 deletion src/language/lexer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @flow /
/* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
Expand Down
3 changes: 1 addition & 2 deletions src/subscription/asyncIteratorReject.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* @flow */
/**
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/

import { $$asyncIterator } from 'iterall';
Expand Down
3 changes: 1 addition & 2 deletions src/subscription/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* @flow */
/**
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/

export { subscribe, createSourceEventStream } from './subscribe';
3 changes: 1 addition & 2 deletions src/subscription/mapAsyncIterator.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* @flow */
/**
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/

import { $$asyncIterator, getAsyncIterator } from 'iterall';
Expand Down
3 changes: 1 addition & 2 deletions src/subscription/subscribe.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* @flow */
/**
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/

import { isAsyncIterable } from 'iterall';
Expand Down
1 change: 1 addition & 0 deletions src/validation/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
Expand Down
5 changes: 2 additions & 3 deletions src/validation/rules/KnownArgumentNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ import invariant from '../../jsutils/invariant';
import suggestionList from '../../jsutils/suggestionList';
import quotedOrList from '../../jsutils/quotedOrList';
import * as Kind from '../../language/kinds';
import type { GraphQLType } from '../../type/definition';


export function unknownArgMessage(
argName: string,
fieldName: string,
type: GraphQLType,
typeName: string,
suggestedArgs: Array<string>
): string {
let message = `Unknown argument "${argName}" on field "${fieldName}" of ` +
`type "${String(type)}".`;
`type "${typeName}".`;
if (suggestedArgs.length) {
message += ` Did you mean ${quotedOrList(suggestedArgs)}?`;
}
Expand Down
5 changes: 3 additions & 2 deletions src/validation/rules/PossibleFragmentSpreads.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { ValidationContext } from '../index';
import { GraphQLError } from '../../error';
import { doTypesOverlap } from '../../utilities/typeComparators';
import { typeFromAST } from '../../utilities/typeFromAST';
import { isCompositeType } from '../../type/definition';
import type { GraphQLType } from '../../type/definition';


Expand Down Expand Up @@ -44,8 +45,8 @@ export function PossibleFragmentSpreads(context: ValidationContext): any {
InlineFragment(node) {
const fragType = context.getType();
const parentType = context.getParentType();
if (fragType &&
parentType &&
if (isCompositeType(fragType) &&
isCompositeType(parentType) &&
!doTypesOverlap(context.getSchema(), fragType, parentType)) {
context.reportError(new GraphQLError(
typeIncompatibleAnonSpreadMessage(parentType, fragType),
Expand Down