diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 13:18:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 13:18:24 +0000 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /app/graphql/types/customer_relations/contact_type.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) | |
download | gitlab-ce-0653e08efd039a5905f3fa4f6e9cef9f5d2f799c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'app/graphql/types/customer_relations/contact_type.rb')
-rw-r--r-- | app/graphql/types/customer_relations/contact_type.rb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/app/graphql/types/customer_relations/contact_type.rb b/app/graphql/types/customer_relations/contact_type.rb new file mode 100644 index 00000000000..35b5bf45698 --- /dev/null +++ b/app/graphql/types/customer_relations/contact_type.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +module Types + module CustomerRelations + class ContactType < BaseObject + graphql_name 'CustomerRelationsContact' + + authorize :read_contact + + field :id, + GraphQL::Types::ID, + null: false, + description: 'Internal ID of the contact.' + + field :organization, Types::CustomerRelations::OrganizationType, + null: true, + description: "Organization of the contact." + + field :first_name, + GraphQL::Types::String, + null: false, + description: 'First name of the contact.' + + field :last_name, + GraphQL::Types::String, + null: false, + description: 'Last name of the contact.' + + field :phone, + GraphQL::Types::String, + null: true, + description: 'Phone number of the contact.' + + field :email, + GraphQL::Types::String, + null: true, + description: 'Email address of the contact.' + + field :description, + GraphQL::Types::String, + null: true, + description: 'Description or notes for the contact.' + + field :created_at, + Types::TimeType, + null: false, + description: 'Timestamp the contact was created.' + + field :updated_at, + Types::TimeType, + null: false, + description: 'Timestamp the contact was last updated.' + end + end +end |