How to send graphql query by postman?

2019-03-07 21:52发布

I use

POST type
URL http://######/graphql
Body: 
query: "query: "{'noteTypes':  {'name', 'label', 'labelColor', 'groupName', 'groupLabel', 'imageUrl'}}"

But it return "message": "Must provide query string."

7条回答
再贱就再见
2楼-- · 2019-03-07 22:58

Checkout https://github.com/hasura/graphqurl - curl for GraphQL:

  • CLI for making GraphQL queries with autocomplete
  • Run GraphiQL locally against any endpoint (with custom headers)
  • Use as a library with nodejs or from the browser
  • Supports subscriptions

I am one of the authors.

gq https://gentle-anchorage-72051.herokuapp.com/v1alpha1/graphql -i

GraphiQL with headers

查看更多
登录 后发表回答