Attributes

Every attribute Trax reads ships in the Trax.Effect package, in the Trax.Effect.Attributes namespace, so a train library can carry them without referencing the API, scheduler or GraphQL packages that act on them. The GraphQL exposure attributes are documented with the GraphQL API.

Authorization

AttributeTargetsDescription
TraxAuthorizeClass, interface, methodRequires an authenticated caller, a policy, or a role. Policies AND, roles OR.
TraxAllowAnonymousClass, interface, methodDeclares a GraphQL-exposed surface intentionally public
TraxAuthorizationReads the two attributes above off a type or method

Data

AttributeTargetsDescription
TraxSensitiveProperty, field, parameter, enum, class, structMasks a value in the stored input and output, junction logs and lifecycle hooks; withholds a question's answers

Execution

AttributeTargetsDescription
TraxRemoteClassSends the train's queued runs to the first remote submitter
TraxConcurrencyLimitClassCaps concurrent direct runs of the train
InjectPropertyProperty injection for ServiceTrain's own framework services

GraphQL exposure

AttributeTargetsDescription
TraxQuery / TraxMutationClassExposes a train as a GraphQL query or mutation
TraxBroadcastClassPublishes the train's lifecycle events to GraphQL subscriptions
TraxQueryModelClassExposes an EF entity as a paged, filterable GraphQL query
TraxMachineClassServes a state machine through its own typed operations