Redis PubSub #1269
-
I am using redis pubsub - I have a 'notification service' that is injected into my mutations. I don't want to create my @PubSub at a resolver level, instead I want to have that just inside my notification service. Is there a way to do that instead of using @PubSub this is what we have today
I'd rather just inject/use my Organization service without passing this around. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Create pubsub manually and put it into graphql context or dependency injection container |
Beta Was this translation helpful? Give feedback.
-
In addition to adding to the createSchema ? currently doing this...
|
Beta Was this translation helpful? Give feedback.
-
(I create the pubsub outside of this and pass to the createSchema, along with my typeid container) |
Beta Was this translation helpful? Give feedback.
-
TypeGraphQL can't inject anything into your services methods. You either pass that manually from resolvers or rely on the dependency injection container. |
Beta Was this translation helpful? Give feedback.
-
ok thanks you answered my question - much appreciated |
Beta Was this translation helpful? Give feedback.
-
for anyone else:
|
Beta Was this translation helpful? Give feedback.
TypeGraphQL can't inject anything into your services methods. You either pass that manually from resolvers or rely on the dependency injection container.