import type { Entity } from '@fougere/schema'; import type { PresenterInstance } from './PresenterInstance.js'; import type { SchemaView } from '@fougere/schema'; import type { RelationConfig } from './RelationConfig.js'; export interface TypeConfig { /** Nom du type GraphQL */ name: string; /** The schema whose fields become the type — a live class, or a card that travelled. */ entity: SchemaView; /** Champs à exclure du type GraphQL */ exclude?: string[]; /** Relations à résoudre */ relations?: Record; /** Presenter instance — adds computed fields as resolveFields on this type. */ presenter?: PresenterInstance; /** Presenter field names (methods to expose). If absent, all methods are exposed. */ presenterFields?: string[]; /** Per-field type metadata from source parsing. */ presenterFieldMeta?: { name: string; returnType?: string; list?: boolean; nullable?: boolean }[]; /** The view a computed field emits, when the presenter declared one. */ presenterViews?: Record; /** Builds (or reuses) the GraphQL object type for a declared view. */ viewType?: (view: Entity, fieldName: string) => any; }