Interfaces
@system-inc/base-foundation · 515c140 · 5 symbols
GqlServer
Interface for a GraphQL server that can handle GraphQL requests.
Members
schema:GraphQLSchemaThe compiled GraphQL schema. Exposed for tooling (eg. printing SDL, generating typed clients) — request handling does not need to read it.
type:stringThe 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.
GqlServerProvider
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
getGqlServer(config:GqlConfiguration):GqlServer | Promise<GqlServer>Build the schema and return a ready-to-serve GraphQL server.
GqlSettings
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
truein development environments andfalsein 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
truein development environments andfalsein 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?:stringThe route to use for the GraphQL server.
type:Constructor<GqlServerProvider>The type of GraphQL adapter to use.
PaginationInputForOptions
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 frombase check's index cross-reference: by declaring one, the resolver takes ownership of translating it safely and planning its index.
PaginationInputMetadata
What a @PaginationInputFor class declared, keyed by the input class.
Members
entity:ConstructorfilterColumns?:ReadonlySet<string>orderColumns?:ReadonlySet<string>Full runtime order allowlist: entity columns ∪ virtual keys.
virtualOrderColumns?:ReadonlySet<string>The subset of
orderColumnsthat are resolver-translated keys.