graphql-framework-experiment: `subscriptionType` is not supported yet
subscriptionType which was supported by nexus is not supported by nexus-future yet.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 20
- Comments: 18 (7 by maintainers)
Commits related to this issue
- feat(schema): add subscriptionType (#1191) closes #447 — committed to prisma-labs/graphql-framework-experiment by deleted user 4 years ago
@Manborough By migrate you mean add
subscriptionFieldto the nexus schema api? Pending some discussion with @Weakky it looks technically trivial so could be very soon.No update yet sorry. I will nominate this issue for next sprint right now though.
@jasonkuhrt @Weakky Any update on this? Would love to use nexus@next in an upcoming project, but that wonโt work without subscriptions ๐
FYI, I have this currently working via a simple plugin and fork I made. Definitely not ideal, but works until either there is a way to pass in a custom HTTP server or until subscriptions are supported natively. I needed to get something working immediately and was trying to avoid returning to the apollo-server. Creating a plugin seemed to be the only way to get access to the generated schema, and the fork simply allows to pass in a shared httpServer.
NOTE: The nexus fork is based on the latest master.
package.json dependencies
example app.ts
subscriptions.ts (extend Subscription type with your subscription fields)
I didnโt test it recently and donโt have the time currently but this should be it:
Subscription.ts
Mutation.ts (excerpt)
main.ts (excerpt)