Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Function query_gql_query doesn't take into account client config #236

Open
BaptisteGi opened this issue Jan 13, 2025 · 0 comments
Open
Labels
priority/2 This issue stalls work on the project or its dependents, it's a blocker for a release state/backlog This issue is part of the backlog type/bug Something isn't working as expected

Comments

@BaptisteGi
Copy link
Contributor

Component

Python SDK

Infrahub SDK version

1.1.0

Current Behavior

When running query_gql_query function I need to explicitly specify the branch otherwise it runs the query on main. This is particularly impacting generator/transform part where the client is configured to run on a branch.

    fabric_data = await self.client.query_gql_query(
        name="fabric-informations",
        variables={"fabric_name": device_dict["fabric"]["node"]["name"]["value"]},
        branch_name=self.client.config.default_branch,
    )

Expected Behavior

I expect infrahub to run the graphql query toward the branch setup in self.client

Steps to Reproduce

Create a Graphql query and run it from the SDK

Additional Information

Maybe other client functions might be impacted ...

@BaptisteGi BaptisteGi added the type/bug Something isn't working as expected label Jan 13, 2025
@exalate-issue-sync exalate-issue-sync bot added state/need-triage This issue needs to be triaged state/needs-triage state/backlog This issue is part of the backlog and removed state/needs-triage state/need-triage This issue needs to be triaged labels Jan 23, 2025
@exalate-issue-sync exalate-issue-sync bot added the priority/2 This issue stalls work on the project or its dependents, it's a blocker for a release label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/2 This issue stalls work on the project or its dependents, it's a blocker for a release state/backlog This issue is part of the backlog type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant