12

I'm trying to use Postman v7.3.4 to develop and test GraphQL APIs. However, when using a GraphQL subscription, the response never shows the data, instead it shows something like the following:

{
    "data": null,
    "extensions": {
        "tracing": {
            "version": 1,
            "startTime": "2019-07-29T20:40:20.1062162Z",
            "endTime": "2019-07-29T20:40:22.7282162Z",
            "duration": 2621830500,
            "parsing": {
                "startOffset": 8100,
                "duration": 160500
            },
            "validation": {
                "startOffset": 8100,
                "duration": 160500
            },
            "execution": {
                "resolvers": []
            }
        }
    }
}

When using something like GraphiQL, the response shows the subscription value when it changes.

I've looked at the Postman documentation but have not been able to determine if subscriptions are actually supported.

So my question is, does Postman v7.3.4 support subscriptions? Are there plans to support in the future?

Griggs
  • 150
  • 2
  • 11

3 Answers3

2

Postman is now supporting websocket connections:-

https://blog.postman.com/postman-supports-websocket-apis/

user1354825
  • 1,108
  • 4
  • 21
  • 54
0

GraphQL subscriptions work via WebSocket and WebSocket endpoints are currently not supported by Postman.

Here is a feature request to support WebSocket in Postman: https://github.com/postmanlabs/postman-app-support/issues/4009

pernpas
  • 199
  • 3
  • 17
0

To extend information the idea is to subscribe to websocket and send it a message with the query.

If you would like to try for example npalm demo (https://github.com/npalm/blog-graphql-spring-service.git) you can subscribe to ws://localhost:8080/subscriptions and ask for notes:

Postman screen

glennsl
  • 28,186
  • 12
  • 57
  • 75