rivantsov / ngraphql

GraphQL .NET Server and Client
MIT License
43 stars 5 forks source link

Version 2.0 is out - Subscriptions, full implementation #38

Open rivantsov opened 2 months ago

rivantsov commented 2 months ago

and other stuff, see Changelog.md for details

jasonlaw commented 2 months ago

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

rivantsov commented 2 months ago

Check if Subscriptions are enabled in server settings

jasonlaw commented 2 months ago

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

rivantsov commented 2 months ago

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.