Skip to content

Update subscribe function to return a Promise of AsyncIterator or ExecutionResult #918

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

Merged
merged 19 commits into from
Aug 14, 2017
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Fix multi-line doc block format
  • Loading branch information
Robert Zhu committed Jul 14, 2017
commit d70e4d5570733d7374d8e5e8d2ec963e4d16dded
8 changes: 4 additions & 4 deletions src/subscription/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ export function subscribe(
}

/**
/* This function checks if the error is a GraphQLError. If it is, convert it to
/* an ExecutionResult interface, containing only errors and no value. Otherwise
/* treat the error as a system-class error and throw it.
*/
* This function checks if the error is a GraphQLError. If it is, convert it to
* an ExecutionResult interface, containing only errors and no value. Otherwise
* treat the error as a system-class error and throw it.
*/
function convertOrThrowError(error) {
if (error instanceof GraphQLError) {
return { errors: [ error ] };
Expand Down