chore: add permitted params

This commit is contained in:
Muhsin Keloth
2024-05-08 17:20:01 +05:30
parent bacf4f52ba
commit f4e134e9ed
3 changed files with 29 additions and 17 deletions
+12 -11
View File
@@ -1,15 +1,16 @@
module LinearMutations
ISSUE_CREATE = <<~GRAPHQL.freeze
mutation IssueCreate($input: IssueCreateInput!) {
issueCreate(
input: $input
) {
success
issue {
id
title
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
GRAPHQL
end
end