Skip to content

Commit

Permalink
Add online_status.graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-zenk committed Aug 21, 2024
1 parent 963db5d commit 0e93ed6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
7 changes: 5 additions & 2 deletions onboardapis/train/third_party/unwired/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ def __init__(self, api: GenericUnwiredAPI) -> None:
super().__init__(api)
self._api.queries.update({
'client_connect': (
Path(__file__).parent / 'mutations' / 'client_connect.graphql'
Path(__file__).parent / 'mutations' / 'client_connect.graphql'
).read_text(encoding='utf-8'),
'client_logout': (
Path(__file__).parent / 'mutations' / 'client_logout.graphql'
Path(__file__).parent / 'mutations' / 'client_logout.graphql'
).read_text(encoding='utf-8'), # TODO: add
'online_status': (
Path(__file__).parent / 'queries' / 'online_status.graphql'
).read_text(encoding='utf-8'),
})

def enable(self) -> None: # TODO: implement
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
query online_status($user_session_id: ID!, $language: String!) {
online_status: splashpage(
user_session_id: $user_session_id
language: $language
) {
error {
...Error
__typename
}
online
user_session_id
__typename
}
}

fragment Error on Error {
error_code
error_message
__typename
}

0 comments on commit 0e93ed6

Please sign in to comment.