Skip to content

Commit

Permalink
feat(graphql): add mutation flag to lograge
Browse files Browse the repository at this point in the history
  • Loading branch information
tchak committed Aug 2, 2023
1 parent ef91d2f commit d743dac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/graphql/api/v2/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def query_info
{
graphql_query: query.query_string,
graphql_variables: query.provided_variables&.to_json,
graphql_mutation: query.lookahead.selections.any? { _1.field.type.respond_to?(:mutation) }.presence,
graphql_null_error: errors.any? { _1.is_a? GraphQL::InvalidNullError }.presence,
graphql_timeout_error: errors.any? { _1.is_a? GraphQL::Schema::Timeout::TimeoutError }.presence
}.compact
Expand Down
1 change: 1 addition & 0 deletions config/initializers/lograge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
graphql_variables: event.payload[:graphql_variables],
graphql_null_error: event.payload[:graphql_null_error],
graphql_timeout_error: event.payload[:graphql_timeout_error],
graphql_mutation: event.payload[:graphql_mutation],
ds_procedure_id: event.payload[:ds_procedure_id],
ds_dossier_id: event.payload[:ds_dossier_id],
browser: event.payload[:browser],
Expand Down

0 comments on commit d743dac

Please sign in to comment.