secu(graphql): log full queries and variables
This commit is contained in:
parent
384e861f8e
commit
f22cc8812b
4 changed files with 4 additions and 125 deletions
|
@ -1,6 +1,4 @@
|
|||
class API::V2::GraphqlController < API::V2::BaseController
|
||||
include GraphqlOperationLogConcern
|
||||
|
||||
def execute
|
||||
result = API::V2::Schema.execute(query,
|
||||
variables: variables,
|
||||
|
@ -24,7 +22,8 @@ class API::V2::GraphqlController < API::V2::BaseController
|
|||
super
|
||||
|
||||
payload.merge!({
|
||||
graphql_operation: operation_log(query(fallback: ''), params[:operationName], to_unsafe_hash(params[:variables]))
|
||||
graphql_query: query(fallback: params[:queryId]),
|
||||
graphql_variables: to_unsafe_hash(params[:variables]).to_json
|
||||
})
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue