Skip to content

Commit

Permalink
Convert 'GraphQL*Config' to exact types (part 2)
Browse files Browse the repository at this point in the history
Continuation of graphql#1391
  • Loading branch information
IvanGoncharov committed Aug 2, 2018
1 parent a1ee52a commit cef3675
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/type/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ export class GraphQLDirective {
defineToStringTag(GraphQLDirective);
defineToJSON(GraphQLDirective);

export type GraphQLDirectiveConfig = {
export type GraphQLDirectiveConfig = {|
name: string,
description?: ?string,
locations: Array<DirectiveLocationEnum>,
args?: ?GraphQLFieldConfigArgumentMap,
astNode?: ?DirectiveDefinitionNode,
};
|};

/**
* Used to conditionally include fields or fragments.
Expand Down
4 changes: 2 additions & 2 deletions src/type/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export type GraphQLSchemaValidationOptions = {|
allowedLegacyNames?: ?$ReadOnlyArray<string>,
|};

export type GraphQLSchemaConfig = {
export type GraphQLSchemaConfig = {|
query?: ?GraphQLObjectType,
mutation?: ?GraphQLObjectType,
subscription?: ?GraphQLObjectType,
Expand All @@ -266,7 +266,7 @@ export type GraphQLSchemaConfig = {
astNode?: ?SchemaDefinitionNode,
extensionASTNodes?: ?$ReadOnlyArray<SchemaExtensionNode>,
...GraphQLSchemaValidationOptions,
};
|};

function typeMapReducer(map: TypeMap, type: ?GraphQLType): TypeMap {
if (!type) {
Expand Down

0 comments on commit cef3675

Please sign in to comment.