diff --git a/src/__tests__/starWarsData.js b/src/__tests__/starWarsData.js index 1c2b848ed9..3b11e4febb 100644 --- a/src/__tests__/starWarsData.js +++ b/src/__tests__/starWarsData.js @@ -100,23 +100,23 @@ export type Character = { appearsIn: Array, }; -export type Human = { +export type Human = {| type: 'Human', id: string, name: string, friends: Array, appearsIn: Array, homePlanet: string, -}; +|}; -export type Droid = { +export type Droid = {| type: 'Droid', id: string, name: string, friends: Array, appearsIn: Array, primaryFunction: string, -}; +|}; /** * Helper function to get a character by ID. diff --git a/src/execution/execute.js b/src/execution/execute.js index ef962dce9e..77f95103d2 100644 --- a/src/execution/execute.js +++ b/src/execution/execute.js @@ -94,7 +94,7 @@ import type { * Namely, schema of the type system that is currently executing, * and the fragments defined in the query document */ -export type ExecutionContext = { +export type ExecutionContext = {| schema: GraphQLSchema, fragments: ObjMap, rootValue: mixed, @@ -103,7 +103,7 @@ export type ExecutionContext = { variableValues: { [variable: string]: mixed }, fieldResolver: GraphQLFieldResolver, errors: Array, -}; +|}; /** * The result of GraphQL execution. diff --git a/src/language/ast.js b/src/language/ast.js index 21bc1797db..22169c327d 100644 --- a/src/language/ast.js +++ b/src/language/ast.js @@ -136,7 +136,7 @@ export type ASTNode = /** * Utility type listing all nodes indexed by their kind. */ -export type ASTKindToNode = { +export type ASTKindToNode = {| Name: NameNode, Document: DocumentNode, OperationDefinition: OperationDefinitionNode, @@ -180,7 +180,7 @@ export type ASTKindToNode = { UnionTypeExtension: UnionTypeExtensionNode, EnumTypeExtension: EnumTypeExtensionNode, InputObjectTypeExtension: InputObjectTypeExtensionNode, -}; +|}; // Name diff --git a/src/language/source.js b/src/language/source.js index 258249f38e..94a875fc52 100644 --- a/src/language/source.js +++ b/src/language/source.js @@ -10,10 +10,10 @@ import invariant from '../jsutils/invariant'; import defineToStringTag from '../jsutils/defineToStringTag'; -type Location = { +type Location = {| line: number, column: number, -}; +|}; /** * A representation of source input to GraphQL.