Chever-John commented on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-1033303115


   In fact, I tested both commands locally and they worked
   
   config
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/7 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "methods": ["POST"],
       "name":"mockGetUser",
       "uri": "/graphql",
       "vars": [
           ["graphql_operation", "==", "query"],
           ["graphql_name", "==", "getUser"]
       ],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:1980": 1
           }
       }
   }'
   ```
   
   curl command
   ```
   curl -X POST http://127.0.0.1:9080/graphql -d '
   query getUser {
       owner {
           name
       }
       repo {
           created
       }
   }'
   ```
   It could be that you missed '-POST'?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to