File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1991,7 +1991,9 @@ function createSourceEventStreamImpl(
1991
1991
try {
1992
1992
const eventStream = executeSubscription ( exeContext ) ;
1993
1993
if ( isPromise ( eventStream ) ) {
1994
- return eventStream . then ( undefined , ( error : unknown ) => ( { errors : [ error as GraphQLError ] } ) ) ;
1994
+ return eventStream . then ( undefined , ( error : unknown ) => ( {
1995
+ errors : [ error as GraphQLError ] ,
1996
+ } ) ) ;
1995
1997
}
1996
1998
1997
1999
return eventStream ;
@@ -2066,9 +2068,11 @@ function executeSubscription(
2066
2068
const result = resolveFn ( rootValue , args , contextValue , info ) ;
2067
2069
2068
2070
if ( isPromise ( result ) ) {
2069
- return result . then ( assertEventStream ) . then ( undefined , ( error : unknown ) => {
2070
- throw locatedError ( error , fieldNodes , pathToArray ( path ) ) ;
2071
- } ) ;
2071
+ return result
2072
+ . then ( assertEventStream )
2073
+ . then ( undefined , ( error : unknown ) => {
2074
+ throw locatedError ( error , fieldNodes , pathToArray ( path ) ) ;
2075
+ } ) ;
2072
2076
}
2073
2077
2074
2078
return assertEventStream ( result ) ;
You can’t perform that action at this time.
0 commit comments