Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept normal object as 'variableValues' arg of subscribe functions #1939

Merged
merged 1 commit into from Jun 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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