summaryrefslogtreecommitdiff
path: root/app/graphql/types/users/namespace_commit_email_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/users/namespace_commit_email_type.rb')
-rw-r--r--app/graphql/types/users/namespace_commit_email_type.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/app/graphql/types/users/namespace_commit_email_type.rb b/app/graphql/types/users/namespace_commit_email_type.rb
new file mode 100644
index 00000000000..a64423c7169
--- /dev/null
+++ b/app/graphql/types/users/namespace_commit_email_type.rb
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+module Types
+ module Users
+ class NamespaceCommitEmailType < BaseObject
+ graphql_name 'NamespaceCommitEmail'
+
+ authorize :read_user_email_address
+
+ field :id,
+ GraphQL::Types::ID,
+ null: false,
+ description: 'Internal ID of the namespace commit email.'
+
+ field :email,
+ Types::Users::EmailType,
+ null: false,
+ description: 'Email.'
+
+ field :namespace,
+ Types::NamespaceType,
+ null: false,
+ description: 'Namespace.'
+
+ field :created_at,
+ Types::TimeType,
+ null: false,
+ description: 'Timestamp the namespace commit email was created.'
+
+ field :updated_at,
+ Types::TimeType,
+ null: false,
+ description: 'Timestamp the namespace commit email was last updated.'
+ end
+ end
+end