npm install
npm run start:dev
- Go to the GraphQL playground at http://localhost:5173/graphql in your browser.
- Paste in the
TestQuery
fromOrgResolver.ts
. It returns data as expected. - Paste in the
TestSubscription
fromOrgResolver.ts
. It produces the error "Could not connect to websocket endpoint ws://localhost:5173/graphql. Please check if the endpoint url is correct."
Instead of start:dev
, run npm run start:prod
. Repeat the above steps and the TestSubscription
will show the message "Listening..." in the Playground.