QueryHost
Esc

Documentation menu

API reference · functions

Function: query()

Generated from the QueryHost package public TypeScript contract.

query<G>(input): Promise<QueryResult<CanonicalGameId<G>>>

Queries one game server through its typed QueryHost profile.

Query failures resolve as a QueryFailure with a stable error code. Input that bypasses the declared type from JavaScript, such as an unregistered game, resolves with INVALID_INPUT and echoes the supplied game value unchanged.

Type Parameters

G

G extends GameInputId

Parameters

input

QueryInput<G>

Returns

Promise<QueryResult<CanonicalGameId<G>>>