Interfaces

@system-inc/base-foundation · 515c140 · 5 symbols

GqlServer

interface

Interface for a GraphQL server that can handle GraphQL requests.

Members

  • schema: GraphQLSchema

    The compiled GraphQL schema. Exposed for tooling (eg. printing SDL, generating typed clients) — request handling does not need to read it.

  • type: string

    The type of GraphQL server, eg. 'apollo', 'yoga', etc. This is used for logging and debugging purposes.

  • handleRequest(request: BaseRequest): Promise<Response>

    Handles a GraphQL request and returns a response.

View source ↗

Provides an implementation of GraphQL to the Worker.

Providers own schema construction and any third-party server wiring (type-graphql, graphql-yoga, etc.). Keeping that surface here — rather than in the foundation's GqlDispatcher — ensures the heavy GraphQL dependencies only land in workers that actually import a provider.

Members

View source ↗

GqlSettings

interface

GraphQL settings for a Worker.

Members

  • directives?: GraphQLDirective[]

    The directives to load for the Worker.

  • graphiql?: NamedConfiguration<boolean>

    Whether to expose the in-browser GraphiQL playground at the GraphQL route (served on GET requests).

    Defaults to true in development environments and false in production. Set explicitly to override the env-aware default.

    Disabling in production is recommended: the playground is a convenience for developers and has no use to end users in production.

    Disabling in production also removes graphiql's GET handler from the GraphQL route.

  • introspection?: NamedConfiguration<boolean>

    Whether schema introspection queries (__schema, __type) are permitted.

    Defaults to true in development environments and false in production. Set explicitly to override the env-aware default.

    Disabling in production prevents anonymous clients from enumerating the full schema surface (queries, mutations, input types, return shapes), which is the primary recon step for crafting targeted attacks against private resolvers. Frontend codegen and tooling should consume the schema from the development environment, not production.

  • route?: string

    The route to use for the GraphQL server.

  • type: Constructor<GqlServerProvider>

    The type of GraphQL adapter to use.

View source ↗

Declaration options for PaginationInputFor. Column names are the entity's property keys, typed as OrmEntityKey<Entity> (the same non-function-key idiom the ORM's find options use) so an invalid name is a compile error at the declaration site. An omitted list means that capability is not offered: client filters (or orderBy) sent anyway are rejected, exactly as on a bare PaginationInput.

Members

  • filterColumns?: readonly (Extract<NonFnKeys<Entity>, string>)[]

  • orderColumns?: readonly (Extract<NonFnKeys<Entity>, string>)[]

  • virtualOrderColumns?: readonly string[]

    Order keys the operation accepts that are NOT columns of entity — query-level sort keys the resolver translates itself (e.g. a junction-table column in a hand-written join). They join the generated order enum and the runtime allowlist like any other key, but are excluded from entity-column validation and from base check's index cross-reference: by declaring one, the resolver takes ownership of translating it safely and planning its index.

View source ↗

What a @PaginationInputFor class declared, keyed by the input class.

Members

  • entity: Constructor

  • filterColumns?: ReadonlySet<string>

  • orderColumns?: ReadonlySet<string>

    Full runtime order allowlist: entity columns ∪ virtual keys.

  • virtualOrderColumns?: ReadonlySet<string>

    The subset of orderColumns that are resolver-translated keys.

View source ↗