Use @ObjectType() for output types with @Field() on each property. Register enums with registerEnumType() before using them in @Field(). Create unions with createUnionType() passing a resolveType function that tells GraphQL which concrete type to use at runtime.
@ObjectType() — defines a GraphQL output type returned from queries and mutations.
@Field(() => Type) — the arrow function is required for arrays and non-primitive types.
registerEnumType() must be called before the enum is referenced in any @Field().
createUnionType() requires a resolveType function — without it GraphQL cannot resolve __typename.
nullable: true on @Field() makes the field optional in the schema; arrays use () => [Type].