How to send graphql query by postman?

前端 未结 14 756
情歌与酒
情歌与酒 2020-11-29 16:19

I use

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


        
14条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 16:52

    Deriving from Estevão Lucas' answer.

    You can also use header Content-type: application/json on postman

    And define the body with:

    {
        "query": "{ your_query }"
    }
    

    This is easily constructed on the client side to form a request payload.

    e.g.

    Output:

提交回复
热议问题