@nestjs/graphql
Version:
GraphQL for NestJS: code-first and schema-first APIs, resolvers as providers, subscriptions, federation and generated SDL, on Apollo or Mercurius.
19 lines • 888 B
TypeScript
interface InheritableField {
name: string;
schemaName: string;
}
/**
* Merges the fields declared along a class hierarchy, given farthest ancestor
* first (the class itself last), the way a subclass overrides what it
* inherits: the nearest declaration of a property wins, and so does the
* nearest declaration of a schema name.
*
* A field an ancestor declares is therefore dropped when a nearer class
* re-declares the same property (under any schema name, e.g., after
* `@Field({ name })`), or declares another property under the same schema
* name. A field keeps the position of the ancestor's declaration it replaces
* under the same schema name, as `{ ...parentFields, ...fields }` would.
*/
export declare function mergeInheritedFields<T extends InheritableField>(fieldsByClass: T[][]): T[];
export {};
//# sourceMappingURL=merge-inherited-fields.helper.d.ts.map