Skip to content

bug: Using client execute_graphql with raise_for_error = False still raises #493

@gmazoyer

Description

@gmazoyer

Component

Python SDK

Infrahub SDK version

1.13.5

Current Behavior

When using the execute_graphql method, of both the sync and async clients, with the keyword arg raise_for_error set to False, if the GraphQL query produces an error, that error will still be raised as a GraphQLError exception.

Expected Behavior

The GraphQLError exception should not be raised, and the return value of the method should contain the error.

Steps to Reproduce

  • Build a SDK client (sync or async)
  • Use a call like await client.execute_graphql(query=some_query, variables=some_vars, raise_for_error=False)

Additional Information

No response

Metadata

Metadata

Assignees

Labels

type/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions