Decorators
@system-inc/base-foundation · 515c140 · 14 symbols
@GqlArgument
Defines a named argument to a GraphQL operation, injected into the resolver method's parameter.
@GqlArguments
Injects all of a GraphQL operation's arguments as one object, typed by a
@GqlArgumentsType class.
@GqlArgumentsType
An object that can be created from the input to a GraphQL operation.
This is a virtual object and will not be created in the GraphQL schema —
its fields become individual arguments of the operation. Inject it with
@GqlArguments().
@GqlField
A field in a @GqlObjectType or @GqlInputType, exposed in the GraphQL
schema.
@GqlFieldResolver
Defines a computed field on the resolver's object type, resolved per
request. Inject the parent object with @GqlRootObject().
@GqlInputType
An object that can be created from the input to a GraphQL operation. This will also create the input in the GraphQL schema.
@GqlInterfaceType
Defines an interface type in the GraphQL schema, implemented by object types.
@GqlMutation
Marks a method as a mutation operation and exposes it in the GraphQL schema.
@GqlObjectType
An object that can be returned from a GraphQL resolver. Creates the type in
the GraphQL schema; its @GqlField properties become the type's fields.
@GqlQuery
Marks a method as a query operation and exposes it in the GraphQL schema.
@GqlResolver
A decorator that can be used to define a GraphQL Resolver. This is a service that exposes operations to the GraphQL schema.
Wraps type-graphql's Resolver so the class is recorded in the
DecoratorRegistry for boot-time settings validation.
@GqlRootObject
Injects the parent (root) object of the operation into a resolver method
parameter — typically used inside a @GqlFieldResolver.
@InjectGqlOperationContext
Injects the GqlOperationContext for the surrounding GraphQL
operation. The decorated parameter must be typed as a
GqlOperationContext<T>; the base/inject-type-matches-parameter
lint rule enforces this at compile time.
Pass an explicit generic argument
(e.g. @InjectGqlOperationContext<OpContextResult>()) to additionally
pin the selection-set element type. With no argument the parameter
may be any GqlOperationContext<...>.
@PaginationInputFor
Declares a pagination input type for one operation (or a family of
operations sharing the same exposure): which of entity's columns a
client may filter and order by.
Apply to a subclass of PaginationInput. The decorator registers the
subclass as a named GraphQL input type and synthesizes enum-typed
filters/orderBy fields from the declared columns, so the allowlist
is part of the schema — an invalid column fails GraphQL validation
before resolver code runs — and flows into frontend codegen. The ORM
bridge (OrmPaginationInput.from) reads the same declaration to
enforce the allowlists at runtime, so vetting cannot be forgotten at a
call site.
A bare PaginationInput argument remains the right choice for plain
pagination: it accepts page inputs only and rejects client filters and
ordering. This decorator is the single opt-in to client-driven
filtering/ordering, and the declaration is deliberately explicit — the
columns listed here are a statement that the operation's queries were
planned for them (see the base check index cross-reference).
Column names are typed as keys of entity (a typo is a compile error at
the declaration site) and validated against the entity's ORM metadata at
class definition time — the runtime gate still matters because a class
property need not be a column (and metadata can drift from types), so a
non-column property throws at import, not at first request.