From 687f2fd9072c155a0051500f3b54246b222c92f7 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Fri, 17 May 2019 11:39:50 +0300 Subject: [PATCH] Switch all Flow types to be exact --- src/index.js | 12 ++++++------ src/renderGraphiQL.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/index.js b/src/index.js index 3d570a08..0f7e2881 100644 --- a/src/index.js +++ b/src/index.js @@ -52,7 +52,7 @@ export type Options = | OptionsResult; export type OptionsResult = OptionsData | Promise; -export type OptionsData = { +export type OptionsData = {| /** * A GraphQL schema from graphql-js. */ @@ -144,12 +144,12 @@ export type OptionsData = { * `__typename` field or alternatively calls the `isTypeOf` method). */ typeResolver?: ?GraphQLTypeResolver, -}; +|}; /** * All information about a GraphQL request. */ -export type RequestInfo = { +export type RequestInfo = {| /** * The parsed GraphQL document. */ @@ -174,7 +174,7 @@ export type RequestInfo = { * A value to pass as the context to the graphql() function. */ context?: ?mixed, -}; +|}; type Middleware = (request: $Request, response: $Response) => Promise; @@ -440,12 +440,12 @@ function graphqlHTTP(options: Options): Middleware { }; } -export type GraphQLParams = { +export type GraphQLParams = {| query: ?string, variables: ?{ [name: string]: mixed }, operationName: ?string, raw: ?boolean, -}; +|}; /** * Provided a "Request" provided by express or connect (typically a node style diff --git a/src/renderGraphiQL.js b/src/renderGraphiQL.js index 88ae7e51..a9782afa 100644 --- a/src/renderGraphiQL.js +++ b/src/renderGraphiQL.js @@ -9,12 +9,12 @@ * @flow strict */ -type GraphiQLData = { +type GraphiQLData = {| query: ?string, variables: ?{ [name: string]: mixed }, operationName: ?string, result?: mixed, -}; +|}; // Current latest version of GraphiQL. const GRAPHIQL_VERSION = '0.12.0';