diff options
Diffstat (limited to 'app/graphql/types/users')
-rw-r--r-- | app/graphql/types/users/email_type.rb | 36 | ||||
-rw-r--r-- | app/graphql/types/users/namespace_commit_email_type.rb | 36 |
2 files changed, 72 insertions, 0 deletions
diff --git a/app/graphql/types/users/email_type.rb b/app/graphql/types/users/email_type.rb new file mode 100644 index 00000000000..5e0b9563f57 --- /dev/null +++ b/app/graphql/types/users/email_type.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +module Types + module Users + class EmailType < BaseObject + graphql_name 'Email' + + authorize :read_user_email_address + + field :id, + GraphQL::Types::ID, + null: false, + description: 'Internal ID of the email.' + + field :email, + GraphQL::Types::String, + null: false, + description: 'Email address.' + + field :confirmed_at, + Types::TimeType, + null: true, + description: 'Timestamp the email was confirmed.' + + field :created_at, + Types::TimeType, + null: false, + description: 'Timestamp the email was created.' + + field :updated_at, + Types::TimeType, + null: false, + description: 'Timestamp the email was last updated.' + end + end +end 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 |