js-graphql-intellij-plugin icon indicating copy to clipboard operation
js-graphql-intellij-plugin copied to clipboard

Feature request: Add response handlers

Open Eddy84 opened this issue 1 year ago • 1 comments

Thank you for the amazing plugin which really saves me a lot of time working on graphql backends.

There is one thing I would really like to see in this plugin which is already implemented in the PHPSTORM rest client.

The rest client allows you to add JS code as response handler like the example below:

### Authorization by token, part 1. Retrieve and save token.
POST https://httpbin.org/post
Content-Type: application/json

{
  "token": "my-secret-token"
}

> {% client.global.set("auth_token", response.body.json.token); %}

This feature would be really nice in order to run queries with dynamic data Right now I have to pick the auth token and place it into the .env file to test queries that require authorization

Eddy84 avatar Aug 02 '23 09:08 Eddy84

pump

Eddy84 avatar Mar 14 '24 09:03 Eddy84