[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-103144 After discussion and review, it was found that the cause of this issue was that we did not support the application/json content type. I will mainly solve this issue in the next 3 days. @pcyan -- 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
[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-103144 After discussion and review, it was found that the cause of this issue was that we did not support the application/json content type. I will mainly solve this issue in the next 3 days. sry @pcyan -- 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
[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034477830 In fact, these are the two new features (support 'json' & 'GET') that we're going to release next. As for the launch time, I personally expect it to be completed within a week. @pcyan > @Chever-John May I also suggest that the `parse_graphql` function should handle the case of GET requests? https://graphql.org/learn/serving-over-http/#get-request Currently an error message is returned regardless of HTTP method used. > > ``` > local body, err = request.get_body(max_size, ctx) > if not body then > return nil, "failed to read graphql body: " .. (err or "request body has zero size") > end > ``` -- 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
[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034477830 In fact, these are the two new features (support 'json' & 'GET') that we're going to release next. As for the launch time, I personally expect it to be completed within a week. > @Chever-John May I also suggest that the `parse_graphql` function should handle the case of GET requests? https://graphql.org/learn/serving-over-http/#get-request Currently an error message is returned regardless of HTTP method used. > > ``` > local body, err = request.get_body(max_size, ctx) > if not body then > return nil, "failed to read graphql body: " .. (err or "request body has zero size") > end > ``` -- 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
[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034477830 In fact, these are the two new features (support 'json' & 'GET') that we're going to introduce next. As for the launch time, I personally expect it to be completed within a week. > @Chever-John May I also suggest that the `parse_graphql` function should handle the case of GET requests? https://graphql.org/learn/serving-over-http/#get-request Currently an error message is returned regardless of HTTP method used. > > ``` > local body, err = request.get_body(max_size, ctx) > if not body then > return nil, "failed to read graphql body: " .. (err or "request body has zero size") > end > ``` -- 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
[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-1033401459 I could not find the relevant description in the `curl` document. Could you please provide. Suggest like this: ``` ### apisix graphql curl 'https://localhost:9080/v2/c4d7a195/graphql' \ -H 'authority: api.mocki.io' \ -H 'accept: */*' \ -H 'content-type: application/json' \ -H 'origin: https://api.mocki.io' \ -X PUT --data-raw '{"operationName":"getUser","variables":{},"query":"query getUser {\n user(id: \"4dc70521-22bb-4396-b37a-4a927c66d43b\") {\nid\n email\nname\n }\n}\n"}' \ --compressed ``` -- 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
[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)
Chever-John edited a comment on issue #6266: URL: https://github.com/apache/apisix/issues/6266#issuecomment-1033276700 In my experience, try removing the '-i' from the request configuration command first. ``` curl http://localhost:9080/apisix/admin/routes/7 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "methods": ["POST"], "name":"mockGetUser", "uri": "/v2/c4d7a195/graphql", "vars": [ ["graphql_operation", "==", "query"], ["graphql_name", "==", "getUser"] ], "upstream": { "type": "roundrobin", "nodes": { "api.mocki.io": 1 } } }' ``` If that doesn't work, try looking at the log, and I'll cover the entire troubleshooting process later. -- 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