MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / resolve_create_client

Function resolve_create_client

graphql-ml-serving/backend/mutations.py:22–32  ·  view source on GitHub ↗
(obj, info, client_id)

Source from the content-addressed store, hash-verified

20@mutation.field("createClient")
21@convert_kwargs_to_snake_case
22async 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)]}

Callers

nothing calls this directly

Calls 2

infoMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected