Skip to content
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

Allow custom PubSubEngine for GraphQL PubSub #422

Closed
dzhelezov opened this issue Sep 28, 2020 · 4 comments
Closed

Allow custom PubSubEngine for GraphQL PubSub #422

dzhelezov opened this issue Sep 28, 2020 · 4 comments

Comments

@dzhelezov
Copy link
Contributor

By default ApolloServer uses an EventEmitter-based PubSubEngine, and in general it is recommended to use a more scalable (like Redis-based) one. However, it doesn't seem to be possible to provide a custom implementation since as thepubSub implementation should be passed to the buildSchema call here :

async buildGraphQLSchema(): Promise<GraphQLSchema> {

Here's a relevant example from type-graphql:
https://github.com/MichalLytek/type-graphql/blob/d5e3403f7610ce8f53b919a3dd490806685570c7/examples/redis-subscriptions/index.ts#L27

@goldcaddy77
Copy link
Owner

Good call. Will take a crack at it this week.

@metmirr
Copy link

metmirr commented Jan 14, 2021

@goldcaddy77 what is the status of this issue?

@goldcaddy77
Copy link
Owner

Hi @metmirr , this is not implemented yet. If you want to put in a PR I'm happy to review and get it integrated.

@goldcaddy77
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants