Skip to content

Commit

Permalink
fix(interceptor): adds case to skip over graphql subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcdo29 committed Apr 13, 2020
1 parent 9290504 commit 1e35310
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nestjs-module/src/interceptor/ogma.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ export class OgmaInterceptor implements NestInterceptor {
case 'http':
return !this.options.http;
case 'graphql':
return !this.options.gql || !context.getArgByIndex(2).req;
return (
!this.options.gql ||
context.getArgByIndex(3)?.operation?.operation === 'subscription'
);
case 'ws':
return !this.options.ws;
case 'rpc':
Expand Down

0 comments on commit 1e35310

Please sign in to comment.