Skip to content

Commit

Permalink
Switch all Flow types to be exact (graphql#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored and jliu670 committed Aug 14, 2020
1 parent d55ac23 commit 2bb9df6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type Options =
| OptionsResult;
export type OptionsResult = OptionsData | Promise<OptionsData>;

export type OptionsData = {
export type OptionsData = {|
/**
* A GraphQL schema from graphql-js.
*/
Expand Down Expand Up @@ -144,12 +144,12 @@ export type OptionsData = {
* `__typename` field or alternatively calls the `isTypeOf` method).
*/
typeResolver?: ?GraphQLTypeResolver<any, any>,
};
|};

/**
* All information about a GraphQL request.
*/
export type RequestInfo = {
export type RequestInfo = {|
/**
* The parsed GraphQL document.
*/
Expand All @@ -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<void>;

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/renderGraphiQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 2bb9df6

Please sign in to comment.