Skip to content

Commit

Permalink
Accept normal object as 'variableValues' arg of subscribe functions
Browse files Browse the repository at this point in the history
Duplicate #1937 but for 'subscribe' and 'createSourceEventStream'
functions
  • Loading branch information
IvanGoncharov committed Jun 1, 2019
1 parent 09fcb11 commit 3d37044
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/subscription/subscribe.js
Expand Up @@ -26,7 +26,6 @@ import {
import { type GraphQLSchema } from '../type/schema';
import mapAsyncIterator from './mapAsyncIterator';

import { type ObjMap } from '../jsutils/ObjMap';
import { type DocumentNode } from '../language/ast';
import { type GraphQLFieldResolver } from '../type/definition';
import { getOperationRootType } from '../utilities/getOperationRootType';
Expand Down Expand Up @@ -57,7 +56,7 @@ declare function subscribe(
document: DocumentNode,
rootValue?: mixed,
contextValue?: mixed,
variableValues?: ?ObjMap<mixed>,
variableValues?: ?{ [variable: string]: mixed },
operationName?: ?string,
fieldResolver?: ?GraphQLFieldResolver<any, any>,
subscribeFieldResolver?: ?GraphQLFieldResolver<any, any>,
Expand All @@ -70,7 +69,7 @@ declare function subscribe(
document: DocumentNode,
rootValue?: mixed,
contextValue?: mixed,
variableValues?: ?ObjMap<mixed>,
variableValues?: ?{ [variable: string]: mixed },
operationName?: ?string,
fieldResolver?: ?GraphQLFieldResolver<any, any>,
subscribeFieldResolver?: ?GraphQLFieldResolver<any, any>,
Expand Down Expand Up @@ -198,7 +197,7 @@ export function createSourceEventStream(
document: DocumentNode,
rootValue?: mixed,
contextValue?: mixed,
variableValues?: ObjMap<mixed>,
variableValues?: ?{ [variable: string]: mixed },
operationName?: ?string,
fieldResolver?: ?GraphQLFieldResolver<any, any>,
): Promise<AsyncIterable<mixed> | ExecutionResult> {
Expand Down

0 comments on commit 3d37044

Please sign in to comment.