ngraphql icon indicating copy to clipboard operation
ngraphql copied to clipboard

Version 2.0 is out - Subscriptions, full implementation

Open rivantsov opened this issue 1 year ago • 4 comments

and other stuff, see Changelog.md for details

rivantsov avatar Jul 09 '24 00:07 rivantsov

Hi @rivantsov ,

May I know how to call the subscription from GraphiQL or even Postman?

I have the following code: image

I have tried to run it from GraphiQL (I have set the graphql endpoint to /graphql/subscriptions) but it will never reach the code. image

I later use the postman to try out the run, it seems like can't use the wss for the subscription. When I tried run with the Post method then it will reach the code but will failed with a null object error. image

jasonlaw avatar Jul 10 '24 10:07 jasonlaw

Check if Subscriptions are enabled in server settings

rivantsov avatar Jul 10 '24 18:07 rivantsov

I am using the default settings, it should be enabled. image

jasonlaw avatar Jul 10 '24 22:07 jasonlaw

ok, I did not try in Graphiql or other playgrounds (I will). But one thing for sure - the 'subscribe' request does NOT go through POST, it comes through established socket connection. But it looks like you try to do it thru Post in Graphiql. I will explain more in a separate issue, expect it within an hour.

rivantsov avatar Jul 11 '24 19:07 rivantsov