The suffix to append to the GraphQL Type name, default is an underscore, override this property in your sub-class to change the suffix
ProtectedgenerateGenerates import statements for entity classes, grouping by package when entityPackageName is a schema-to-package map.
Optionalavailability: GeneratedTypeAvailabilityProtectedgenerateProtectedgenerateProtectedgenerateProtectedgenerateOptionalavailability: GeneratedTypeAvailabilityProtectedgenerateProtectedgenerateProtectedgenerateProtectedgenerateProtectedgenerateOptionalavailability: GeneratedTypeAvailabilityProtectedgenerateProtectedgetGenerates the full server GraphQL type name for an entity (with suffix).
The entity to generate the type name for
The full GraphQL type name (with suffix)
ProtectedgetGenerates the base GraphQL type name for an entity using SchemaBaseTable pattern. Preserves original capitalization. Special case: MJ core schema uses "MJ" prefix. This ensures unique type names across different schemas.
The entity to generate the type name for
The base GraphQL type name (without suffix)
ProtectedgetMaps a column's SQL type to the TypeGraphQL @Field(...) type-fn argument.
Categories that emit an empty string fall through to TypeGraphQL's automatic inference based on the field's TypeScript type — appropriate for string, Date, and binary-as-string columns. Boolean / Float require an explicit type fn, and anything else defaults to Int.
The category checks come from @memberjunction/sql-dialect so that the
list of recognized type names lives in exactly one place per category.
ProtectedisTrue when the related entity's GraphQL ObjectType will NOT be declared in the file being
generated, so emitting a @Field/@FieldResolver that names it would not compile (TS2304).
When availability is supplied (every in-tree caller supplies it), the decision is made against
the ACTUAL set of entities being generated into this file rather than inferred from schema or
package heuristics. That set is ground truth: a bare-name reference compiles iff the class is
emitted here, and the class is emitted here iff the entity was in the array handed to the
generator. Heuristics can only approximate that set — runCodeGen narrows the generated entities
by BOTH the entityPackageName schema→package map AND the excludeSchemas/inclusion filters, so
a predicate that models only the package map still emits uncompilable references for anything
dropped by the other filter (the linked-Open-App break: a base app generated alongside a
dependent app that foreign-keys into it).
The one exception is a CORE (__mj) related entity in a NON-core file: it is absent from the
generated set but resolves through the mj_core_schema_server_object_types namespace import, so
it is always in scope. In the core file itself there is no such import (that file is the
module), so core related entities must satisfy set membership like everything else.
excludeRelatedEntitiesExternalToSchema is honored first and unchanged: it asks for a
schema-scoped file, which is a narrower request than type availability.
Optionalavailability: GeneratedTypeAvailabilitythe types resolvable in this file; when omitted, falls back to the legacy
entityPackageName schema→package heuristic so that existing subclasses and
callers using the pre-availability signature keep their previous behavior.
ProtectedschemaReturns a JavaScript expression string (for use in generated code) that resolves to the schema name at runtime. Core schema uses the dynamic config lookup; non-core schemas use a literal string.
This class is responsible for generating the GraphQL Server resolvers and types for the entities, you can sub-class this class to extend/modify the logic, make sure to use @memberjunction/global RegisterClass decorator so that your class is used.