Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Switch all Flow types to be exact #502

Merged
merged 1 commit into from
May 17, 2019
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
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