Skip to content

Commit

Permalink
fixed error in passing variable_values
Browse files Browse the repository at this point in the history
  • Loading branch information
naveennamani committed Oct 23, 2023
1 parent d1eb41d commit d67ad49
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions omnivoreql/omnivoreql.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import uuid
from typing import List


class OmnivoreQL:
def __init__(self, api_token: str, graphqlEndpointUrl: str = "https://api-prod.omnivore.app/api/graphql") -> None:
"""
Expand Down Expand Up @@ -40,11 +41,13 @@ def save_url(self, url: str, labels: List[str] = None):
)
return self.client.execute(
mutation,
variable_values = {
"clientRequestId": str(uuid.uuid4()),
"source": "api",
"url": url,
"labels": labels
variable_values={
"input": {
"clientRequestId": str(uuid.uuid4()),
"source": "api",
"url": url,
"labels": labels
}
}
)

Expand Down Expand Up @@ -370,7 +373,7 @@ def delete_article(self, article_id: str):
}""")
return self.client.execute(
mutation,
variable_values= {
variable_values={
"input": {
"articleID": article_id,
"bookmark": False
Expand Down

0 comments on commit d67ad49

Please sign in to comment.