GitHub Action
commited on
Commit
·
6440d27
1
Parent(s):
e2c8dd5
Sync from GitHub with Git LFS
Browse files
scripts/publish_to_hashnode.py
CHANGED
@@ -114,8 +114,8 @@ def update_post(post_id, title, slug, markdown_content):
|
|
114 |
|
115 |
def publish_draft(draft_id):
|
116 |
query = """
|
117 |
-
mutation PublishDraft($
|
118 |
-
publishDraft(
|
119 |
post {
|
120 |
id
|
121 |
slug
|
@@ -124,7 +124,7 @@ def publish_draft(draft_id):
|
|
124 |
}
|
125 |
}
|
126 |
"""
|
127 |
-
variables = {"
|
128 |
return graphql_request(query, variables)["data"]["publishDraft"]["post"]
|
129 |
|
130 |
|
|
|
114 |
|
115 |
def publish_draft(draft_id):
|
116 |
query = """
|
117 |
+
mutation PublishDraft($input: PublishDraftInput!) {
|
118 |
+
publishDraft(input: $input) {
|
119 |
post {
|
120 |
id
|
121 |
slug
|
|
|
124 |
}
|
125 |
}
|
126 |
"""
|
127 |
+
variables = {"input": {"draftId": draft_id}}
|
128 |
return graphql_request(query, variables)["data"]["publishDraft"]["post"]
|
129 |
|
130 |
|