diff --git a/answer_rocket/__init__.py b/answer_rocket/__init__.py index 879b422..0ebb0a6 100644 --- a/answer_rocket/__init__.py +++ b/answer_rocket/__init__.py @@ -5,7 +5,7 @@ 'MetaDataFrame' ] -__version__ = "0.2.89" +__version__ = "0.2.90" from answer_rocket.client import AnswerRocketClient from answer_rocket.error import AnswerRocketClientError diff --git a/answer_rocket/layouts.py b/answer_rocket/layouts.py index 8558909..3444879 100644 --- a/answer_rocket/layouts.py +++ b/answer_rocket/layouts.py @@ -1,8 +1,6 @@ -from typing import Optional -from sgqlc.types import Variable, Arg, non_null, String from answer_rocket.client_config import ClientConfig from answer_rocket.graphql.client import GraphQlClient -from answer_rocket.graphql.schema import UUID as GQL_UUID +from answer_rocket.graphql.sdk_operations import Operations class DynamicLayouts: @@ -19,14 +17,20 @@ def __init__(self, config: ClientConfig, gql_client: GraphQlClient) -> None: def get_dynamic_layout(self, id: str): """ Get a dynamic layout by id. - - id : str - The UUID of the dynamic layout to retrieve. - + + Args: + id (str): The UUID of the dynamic layout to retrieve. + + Returns: + The dynamic layout data from the server. """ - op = Operations.query.get_dynamic_layout - self._gql_client.submit(op, { - 'id': id, - }) + try: + op = Operations.query.get_dynamic_layout + result = self._gql_client.submit(op, { + 'id': id, + }) - return result.get_dynamic_layout + return result.get_dynamic_layout + + except Exception as e: + raise Exception(f"Failed to get dynamic layout: {e}")