Skip to content

Commit c7399a4

Browse files
committed
Use variables in graphql query
1 parent 68fa5af commit c7399a4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

image/src/github_pr_comment/comment.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,13 @@ def hide_comment(
398398

399399
response = github.post(
400400
graphql_url, json={
401-
'query': '''
402-
mutation {
403-
minimizeComment(input: {subjectId: "''' + comment.node_id + '''", classifier: ''' + classifier + '''}) {
404-
clientMutationId
405-
}
401+
'query': 'mutation($input: MinimizeCommentInput!) { minimizeComment(input: $input) { clientMutationId } }',
402+
'variables': {
403+
'input': {
404+
'subjectId': comment.node_id,
405+
'classifier': classifier
406406
}
407-
'''
407+
}
408408
}
409409
)
410410
debug(f'graphql response: {response.content}')

0 commit comments

Comments
 (0)