Commit 0e52b55c authored by Luke Duncalfe's avatar Luke Duncalfe Committed by Sean McGivern

Extend the scope of Graphql/JSONType rubocop

This change also detects GraphQL/JSONType offenses in mutations and
resolvers. Previously it was limited to detecting offenses only in
types.

See

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38125#note_389671877
parent 9e404d35
......@@ -339,8 +339,8 @@ Graphql/AuthorizeTypes:
Graphql/JSONType:
Enabled: true
Include:
- 'app/graphql/types/**/*'
- 'ee/app/graphql/types/**/*'
- 'app/graphql/**/*'
- 'ee/app/graphql/**/*'
Exclude:
- 'spec/**/*.rb'
- 'ee/spec/**/*.rb'
......
......@@ -12,11 +12,11 @@ module Mutations
required: true,
description: 'Full path of the project.'
argument :configuration, GraphQL::Types::JSON,
argument :configuration, GraphQL::Types::JSON, # rubocop:disable Graphql/JSONType
required: true,
description: 'Payload containing SAST variable values (https://docs.gitlab.com/ee/user/application_security/sast/#available-variables).'
field :result,
field :result, # rubocop:disable Graphql/JSONType
GraphQL::Types::JSON,
null: true,
description: 'JSON containing the status of MR creation.'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment