Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion answer_rocket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 16 additions & 12 deletions answer_rocket/layouts.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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}")