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

Commit

Permalink
Flow: Switch to explicit inexact objects
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jun 30, 2019
1 parent dc4c7cd commit 0d1cdc1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ deprecated-utility=error
dynamic-export=off
unsafe-getters-setters=error
inexact-spread=error
implicit-inexact-object=off
implicit-inexact-object=error
unnecessary-optional-chain=error
unnecessary-invariant=error

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/http-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const TestSchema = new GraphQLSchema({
}),
});

function urlString(urlParams?: ?{ [param: string]: mixed }) {
function urlString(urlParams?: ?{ [param: string]: mixed, ... }) {
let string = '/graphql';
if (urlParams) {
string += '?' + stringify(urlParams);
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export type OptionsData = {|
*
* This function may be async.
*/
extensions?: ?(info: RequestInfo) => { [key: string]: mixed },
extensions?: ?(info: RequestInfo) => { [key: string]: mixed, ... },

/**
* A boolean to optionally enable GraphiQL mode.
Expand Down Expand Up @@ -150,7 +150,7 @@ export type RequestInfo = {|
/**
* The variable values used at runtime.
*/
variables: ?{ +[name: string]: mixed },
variables: ?{ +[name: string]: mixed, ... },

/**
* The (optional) operation name requested.
Expand Down Expand Up @@ -435,7 +435,7 @@ function graphqlHTTP(options: Options): Middleware {

export type GraphQLParams = {|
query: ?string,
variables: ?{ +[name: string]: mixed },
variables: ?{ +[name: string]: mixed, ... },
operationName: ?string,
raw: ?boolean,
|};
Expand All @@ -456,8 +456,8 @@ async function getGraphQLParams(request: $Request): Promise<GraphQLParams> {
* Helper function to get the GraphQL params from the request.
*/
function parseGraphQLParams(
urlData: { [param: string]: mixed },
bodyData: { [param: string]: mixed },
urlData: { [param: string]: mixed, ... },
bodyData: { [param: string]: mixed, ... },
): GraphQLParams {
// GraphQL Query string.
let query = urlData.query || bodyData.query;
Expand Down
2 changes: 1 addition & 1 deletion src/parseBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { type $Request } from 'express';
*/
export async function parseBody(
req: $Request,
): Promise<{ [param: string]: mixed }> {
): Promise<{ [param: string]: mixed, ... }> {
const body = req.body;

// If express has already parsed a body as a keyed object, use it.
Expand Down
2 changes: 1 addition & 1 deletion src/renderGraphiQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

type GraphiQLData = {|
query: ?string,
variables: ?{ +[name: string]: mixed },
variables: ?{ +[name: string]: mixed, ... },
operationName: ?string,
result?: mixed,
options: GraphiQLOptions,
Expand Down

0 comments on commit 0d1cdc1

Please sign in to comment.