Merge pull request #19518 from DxCx/graphql-subscribe

[GraphQL] Update subscribe signature for graphql v0.11.x
This commit is contained in:
Nathan Shively-Sanders
2017-09-06 09:18:04 -07:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -7,6 +7,7 @@
// Kepennar <https://github.com/kepennar>
// Mikhail Novikov <https://github.com/freiksenet>
// Ivan Goncharov <https://github.com/IvanGoncharov>
// Hagai Cohen <https://github.com/DxCx>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
+2 -2
View File
@@ -14,7 +14,7 @@ export function subscribe(
operationName?: string,
fieldResolver?: GraphQLFieldResolver<any, any>,
subscribeFieldResolver?: GraphQLFieldResolver<any, any>
): AsyncIterator<ExecutionResult>;
): Promise<AsyncIterator<ExecutionResult> | ExecutionResult>;
export function createSourceEventStream(
schema: GraphQLSchema,
@@ -26,4 +26,4 @@ export function createSourceEventStream(
},
operationName?: string,
fieldResolver?: GraphQLFieldResolver<any, any>
): AsyncIterable<any>;
): Promise<AsyncIterable<any>>;