(obj, info, client_id)
| 20 | @mutation.field("createClient") |
| 21 | @convert_kwargs_to_snake_case |
| 22 | async def resolve_create_client(obj, info, client_id): |
| 23 | try: |
| 24 | logging.info(f"Client id: {client_id}") |
| 25 | if not clients.get(client_id): |
| 26 | client = {"client_id": client_id} |
| 27 | clients[client_id] = client |
| 28 | return {"success": True, "client": client} |
| 29 | return {"success": False, "errors": ["Client is taken"]} |
| 30 | |
| 31 | except Exception as error: |
| 32 | return {"success": False, "errors": [str(error)]} |