Member Junction
    Preparing search index...

    Function getGraphQLTypeNameBase

    • Generates the base GraphQL type name for an entity using SchemaBaseTable pattern. Preserves original capitalization. Uses getSchemaPrefix for the schema prefix, which aligns with the SQL GetClassNameSchemaPrefix function in vwEntities. This ensures unique type names across different schemas.

      Parameters

      • entity: EntityInfo

        The entity to generate the type name for

      Returns string

      The base GraphQL type name (without suffix like ViewByID, DynamicView, etc.)

      // Entity in core schema
      const entity = { SchemaName: '__mj', BaseTable: 'User' };
      getGraphQLTypeNameBase(entity)
      // Output: "MJUser"
      // Entity in custom schema
      const entity = { SchemaName: 'sales', BaseTable: 'Invoice' };
      getGraphQLTypeNameBase(entity)
      // Output: "salesInvoice"