-
Notifications
You must be signed in to change notification settings - Fork 73
fix(fastify-template): fix for subscriptions in fastify template #2248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I've not verified it as I am away from laptop but it LGTM barring the small requested change inline.
I'll let @craicoverflow @wtrocki do the verification.
@@ -45,6 +45,7 @@ async function start() { | |||
|
|||
app.register((mercurius as any), { | |||
schema, | |||
resolvers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think resolvers
should include noteResolvers
as in
typeDefs, resolvers: [ |
Let's start this year with this small PR. Looking at it now |
I cannot fix issues in PR. Can you add me to fork :) THX |
How about running this from the code:
PS: This doesn't seem to be working for me. |
Thanks for pointing that out 😅 I've added them now @machi1990.
Added you @wtrocki :)
Same. It doesn't give an error in the terminal like last time, but shows that localhost refused to connect on the browser. |
Okay so this way of testing the template works if I don't specify the noteResolvers and simply leave the code like this:
But even with this when I tested the subscriptions they were not working. Could it be because Will have to look for some other way to fix this then I guess 🤔 |
Would it be a good idea to switch from mercurius to apollo-server-fastify? |
Sounds good |
Closing this since we're shifting to apollo-server-fastify. See #2256 |
Fix for #2174
Types of changes
What types of changes does your code introduce to Graphback?
Checklist
Further comments
As discussed I've added resolvers in the plugin options of mercurius which should fix the issue.
Verification
I tried verifying this by enabling the fastify template and then using the updated cli (by running
node dist/index.js
in the create-graphback folder) but I received this error due to which the template didn't load and I wasn't able to test it. Please let me know if there are some other steps I can take to test if the subscriptions are working or not. Thanks.