convexServerQuery

db · /index·async functionthrows When

Calls a deployed Convex serverQuery function by path (e.g. db/shops:byDomain), injecting the shared serverSecret the server-trust constructor requires. This is the seam's only read transport; the identity-less pre-tenant/cross-tenant reads (Shop.findByDomain in middleware, findAll, the auth adapter lookups) all flow through it.

Signature

@nordcom/commerce-db
function convexServerQuery(name: string, args: Record<string, unknown>): Promise<Result>;

Parameters

NameTypeDescription
namestring
argsRecord<string, unknown>

Returns

The function's result.

Throws

When
the Convex URL or server secret is unset.

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

Sourcedb.ts:168Edit the JSDoc directly
Metadata@nordcom/commerce-db@0.1.0Open in GitHub ↗

On this page