diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 15:09:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-16 15:09:00 +0300 |
commit | 9bfdb5cf67ca45ac6d354e18168f5df12b60ccd2 (patch) | |
tree | 632218f5978fd547675f4b4e73dabcb22d62fc87 /app/graphql | |
parent | 6cf1f4c521a621fa2b4dc1735bf5a8c2846f7e6a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r-- | app/graphql/types/snippets/file_input_action_enum.rb | 15 | ||||
-rw-r--r-- | app/graphql/types/snippets/file_input_type.rb | 26 |
2 files changed, 41 insertions, 0 deletions
diff --git a/app/graphql/types/snippets/file_input_action_enum.rb b/app/graphql/types/snippets/file_input_action_enum.rb new file mode 100644 index 00000000000..7785853f3a8 --- /dev/null +++ b/app/graphql/types/snippets/file_input_action_enum.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Types + module Snippets + class FileInputActionEnum < BaseEnum + graphql_name 'SnippetFileInputActionEnum' + description 'Type of a snippet file input action' + + value 'create', value: :create + value 'update', value: :update + value 'delete', value: :delete + value 'move', value: :move + end + end +end diff --git a/app/graphql/types/snippets/file_input_type.rb b/app/graphql/types/snippets/file_input_type.rb new file mode 100644 index 00000000000..85a02c8f493 --- /dev/null +++ b/app/graphql/types/snippets/file_input_type.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module Types + module Snippets + class FileInputType < BaseInputObject # rubocop:disable Graphql/AuthorizeTypes + graphql_name 'SnippetFileInputType' + description 'Represents an action to perform over a snippet file' + + argument :action, Types::Snippets::FileInputActionEnum, + description: 'Type of input action', + required: true + + argument :previous_path, GraphQL::STRING_TYPE, + description: 'Previous path of the snippet file', + required: false + + argument :file_path, GraphQL::STRING_TYPE, + description: 'Path of the snippet file', + required: true + + argument :content, GraphQL::STRING_TYPE, + description: 'Snippet file content', + required: false + end + end +end |