Skip to content

Commit

Permalink
test: update pubsub method
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Dec 4, 2024
1 parent b592156 commit 5bfc804
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ export class RecipesResolver {
description: 'subscription description',
})
recipeAdded() {
return pubSub.asyncIterator('recipeAdded');
return pubSub.asyncIterableIterator('recipeAdded');
}
}
2 changes: 1 addition & 1 deletion packages/apollo/tests/graphql/cats/cats.resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ export class CatsResolvers {

@Subscription('catCreated')
catCreated() {
return pubSub.asyncIterator('catCreated');
return pubSub.asyncIterableIterator('catCreated');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ export class NotificationResolver {
id: string,
) {
this.logger.log('User subscribed to newNotification');
return pubSub.asyncIterator('newNotification');
return pubSub.asyncIterableIterator('newNotification');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ export class RecipesResolver {

@Subscription((returns) => Recipe)
recipeAdded() {
return pubSub.asyncIterator('recipeAdded');
return pubSub.asyncIterableIterator('recipeAdded');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ export class RecipesResolver {
description: 'subscription description',
})
recipeAdded() {
return pubSub.asyncIterator('recipeAdded');
return pubSub.asyncIterableIterator('recipeAdded');
}
}
2 changes: 1 addition & 1 deletion packages/mercurius/tests/graphql/cats/cats.resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ export class CatsResolvers {

@Subscription('catCreated')
catCreated() {
return pubSub.asyncIterator('catCreated');
return pubSub.asyncIterableIterator('catCreated');
}
}

0 comments on commit 5bfc804

Please sign in to comment.