shuaijinchao commented on a change in pull request #6343:
URL: https://github.com/apache/apisix/pull/6343#discussion_r807785879
##########
File path: apisix/core/ctx.lua
##########
@@ -36,7 +37,48 @@ local pcall = pcall
local _M = {version = 0.2}
-local GRAPHQL_DEFAULT_MAX_SIZE = 1048576 -- 1MiB
+local GRAPHQL_DEFAULT_MAX_SIZE = 1048576 -- 1MiB
+local GRAPHQL_REQ_DATA_KEY = "query"
+local GRAPHQL_REQ_METHOD_HTTP_GET = "GET"
+local GRAPHQL_REQ_METHOD_HTTP_POST = "POST"
+local GRAPHQL_REQ_MIME_JSON = "application/json"
+
+
+local fetch_graphql_data = {
+ [GRAPHQL_REQ_METHOD_HTTP_GET] = function(ctx, max_size)
+ local body = request.get_uri_args(ctx)[GRAPHQL_REQ_DATA_KEY]
Review comment:
if it is a table, do you think should we use the first value in the
table or reject the request.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]