Skip to content

Commit fba4a53

Browse files
committed
fixes execute_graphql method that was not considering default_branch
1 parent f2a19e0 commit fba4a53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

infrahub_sdk/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ async def execute_graphql(
575575
_type_: _description_
576576
"""
577577

578+
branch_name = branch_name or self.default_branch
578579
url = self._graphql_url(branch_name=branch_name, at=at)
579580

580581
payload: dict[str, Union[str, dict]] = {"query": query}
@@ -1112,6 +1113,7 @@ def execute_graphql(
11121113
dict: The result of the GraphQL query or mutation.
11131114
"""
11141115

1116+
branch_name = branch_name or self.default_branch
11151117
url = self._graphql_url(branch_name=branch_name, at=at)
11161118

11171119
payload: dict[str, Union[str, dict]] = {"query": query}

0 commit comments

Comments
 (0)