Skip to content

Commit

Permalink
query_from_name public
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Shutik committed Oct 31, 2024
1 parent 8e40398 commit 7712e3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shopify_client/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __build_url(self, **params):
def __call__(self, *args, **kwargs):
return self.__query(*args, **kwargs)

def __query_from_name(self, name):
def query_from_name(self, name):
assert self.grapgql_queries_dir, "GraphQL queries directory is not set"

query_path = os.path.join(self.grapgql_queries_dir, f"{name}.graphql")
Expand All @@ -31,7 +31,7 @@ def __query(self, query=None, query_name=None, variables=None, operation_name=No
assert query or query_name, "Either 'query' or 'query_name' must be provided"

if query is None and query_name:
query = self.__query_from_name(query_name)
query = self.query_from_name(query_name)

if paginate:
return self.__paginate(query=query, variables=variables, operation_name=operation_name, page_size=page_size)
Expand Down

0 comments on commit 7712e3f

Please sign in to comment.