diff options
Diffstat (limited to 'app/graphql/types/audit_events/definition_type.rb')
-rw-r--r-- | app/graphql/types/audit_events/definition_type.rb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/app/graphql/types/audit_events/definition_type.rb b/app/graphql/types/audit_events/definition_type.rb new file mode 100644 index 00000000000..575b99c5815 --- /dev/null +++ b/app/graphql/types/audit_events/definition_type.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +module Types + module AuditEvents + class DefinitionType < ::Types::BaseObject + graphql_name 'AuditEventDefinition' + description 'Represents the YAML definitions for audit events defined ' \ + 'in `ee/config/audit_events/types/<event-type-name>.yml` ' \ + 'and `config/audit_events/types/<event-type-name>.yml`.' + + authorize :audit_event_definitions + + field :name, GraphQL::Types::String, + null: false, + description: 'Key name of the audit event.' + + field :description, GraphQL::Types::String, + null: false, + description: 'Description of what action the audit event tracks.' + + field :introduced_by_issue, GraphQL::Types::String, + null: true, + description: 'Link to the issue introducing the event. For older' \ + 'audit events, it can be a commit URL rather than a' \ + 'merge request URL.' + + field :introduced_by_mr, GraphQL::Types::String, + null: true, + description: 'Link to the merge request introducing the event. For' \ + 'older audit events, it can be a commit URL rather than' \ + 'a merge request URL.' + + field :feature_category, GraphQL::Types::String, + null: false, + description: 'Feature category associated with the event.' + + field :milestone, GraphQL::Types::String, + null: false, + description: 'Milestone the event was introduced in.' + + field :saved_to_database, GraphQL::Types::Boolean, + null: false, + description: 'Indicates if the event is saved to PostgreSQL database.' + + field :streamed, GraphQL::Types::Boolean, + null: false, + description: 'Indicates if the event is streamed to an external destination.' + end + end +end |