Skip to content

Commit 1de55f6

Browse files
Improve docstring
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent afe5372 commit 1de55f6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

infrahub_sdk/client.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,14 +1649,17 @@ def execute_graphql(
16491649
branch_name (str, optional): Name of the branch on which the query will be executed. Defaults to None.
16501650
at (str, optional): Time when the query should be executed. Defaults to None.
16511651
timeout (int, optional): Timeout in second for the query. Defaults to None.
1652-
raise_for_error (bool, optional): Deprecated, flag to indicate that we need to raise an exception if the response has some errors.
1653-
Defaults to True.
1652+
raise_for_error (bool | None, optional): Deprecated. Controls only HTTP status handling.
1653+
- None (default) or True: HTTP errors raise via `resp.raise_for_status()`.
1654+
- False: HTTP errors are not automatically raised.
1655+
GraphQL errors always raise `GraphQLError`.
1656+
Defaults to None.
1657+
16541658
Raises:
1655-
GraphQLError: When an error occurs during the execution of the GraphQL query or mutation.
1659+
GraphQLError: When the GraphQL response contains errors.
16561660
16571661
Returns:
1658-
dict: The result of the GraphQL query or mutation.
1659-
"""
1662+
dict: The GraphQL data payload (`response["data"]`).
16601663
if raise_for_error is not None:
16611664
warnings.warn(
16621665
"Using `raise_for_error` is deprecated, use `try/except` to handle errors.",

0 commit comments

Comments
 (0)