feat: add create issue API

This commit is contained in:
Muhsin Keloth
2024-05-09 12:23:14 +05:30
parent 0268d544d1
commit 1ddc05dadb
6 changed files with 63 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
module LinearMutations
def self.issue_create(input)
graphql_input = input.map { |key, value| "#{key}: \"#{value}\"" }.join(', ')
<<~GRAPHQL
mutation {
issueCreate(input: { #{graphql_input} }) {
success
issue {
id
title
}
}
}
GRAPHQL
end
end