Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Support GraphQL variables #40

Merged
merged 6 commits into from Aug 23, 2019

Conversation

bookmoons
Copy link
Contributor

@bookmoons bookmoons commented Aug 22, 2019

Adds support for GraphQL variables in a GraphQL body translation.

Adds new test cases for GraphQL bodies.

There's also a live example that can be run against the GitHub API. It pulls a few repo names:

  • node bin/postman-to-k6.s example/v2/github-graphql.json >test.js
  • In GitHub developer settings grab a personal access token, one with repo access. Paste it as the value of GITHUB_TOKEN at the top.
  • k6 run test.js

It should print an info line with an object like this:

{"data":{"viewer":{"name":null,"repositories":{"nodes":[{"name":"ulid"},{"name":"gojay"},{"name":"yaegi"}]}}}}

Closes #38.

@robingustafsson
Copy link
Member

Have tested this and works great. Merging. Thanks @bookmoons!

@robingustafsson robingustafsson merged commit 7be3670 into grafana:master Aug 23, 2019
@bookmoons
Copy link
Contributor Author

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support GraphQL variables
2 participants