Member Junction
    Preparing search index...

    AppContext is the context object that is passed to all resolvers.

    type AppContext = {
        ClientIp?: string;
        dataSource: sql.ConnectionPool;
        dataSources: DataSourceInfo[];
        providers: ProviderInfo[];
        queryRunner?: sql.Request;
        RequestOrigin?: string;
        userPayload: UserPayload;
    }
    Index

    Properties

    ClientIp?: string

    The caller's network address as Express resolved it (req.ip, which honours the app's trust proxy setting). Present for HTTP requests; absent on WebSocket (subscription) contexts. Used only to key abuse limits (e.g. realtime verification sends) — never as an identity.

    dataSource: sql.ConnectionPool

    The default and backwards compatible connection pool.

    dataSources: DataSourceInfo[]

    Array of connection pools that have additional information about their intended use e.g. Admin, Read-Write, Read-Only.

    providers: ProviderInfo[]

    Per-request DatabaseProviderBase instances

    queryRunner?: sql.Request
    RequestOrigin?: string

    The request's Origin header as a normalized origin — scheme, host and port, lowercased, no trailing slash (e.g. https://app.example.com:8443). Normalized by NormalizeOrigin, the same helper the realtime widget allowlist uses, so it compares to allowlist entries normalized the same way with plain string equality. Ports are kept as sent; browsers omit default ports.

    Undefined when the request sent no Origin (server-to-server calls, many same-origin GETs), sent the opaque null origin, or sent a value that is not an http(s) origin. Always absent on WebSocket (subscription) contexts. Treat undefined as "origin unknown": an allowlist check must fail closed on it.

    userPayload: UserPayload