-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
type/bugSomething isn't working as expectedSomething isn't working as expected
Description
Component
Python SDK
Infrahub SDK version
0.13.1
Current Behavior
The execute_graphql method of InfrahubClient does not consider the default_branch setting on InfrahubClient.
Expected Behavior
execute_graphql executes the the graphql query in the branch that is set as default_branch
Steps to Reproduce
- Spin up an instance of Infrahub
- Create a branch
test - Create a
BuiltinTagnode in thetestbranch - Run the following script
from infrahub_sdk import InfrahubClientSync, Config
client = InfrahubClientSync(config=Config(default_branch="test"))
client.execute_graphql(query="query { BuiltinTag { count }}") # result count will be 0
client.execute_graphql(query="query { BuiltinTag { count }}", branch_name="test") # result count will be 1Additional Information
The branch_name argument that you can use seems to deviate from how we typically name this argument in other methods in the SDK. Typically the name would be branch.
Metadata
Metadata
Assignees
Labels
type/bugSomething isn't working as expectedSomething isn't working as expected