UNPKG

@theguild/federation-composition

Version:

Open Source Composition library for Apollo Federation

79 lines 2.23 kB
import { DirectiveNode } from 'graphql'; import type { FederationVersion } from '../../specifications/federation.js'; import { Deprecated, Description, ObjectType } from '../../subgraph/state.js'; import type { Key, MapByGraph, TypeBuilder } from './common.js'; export declare function isRealExtension(meta: ObjectTypeStateInGraph, version: FederationVersion): boolean; export declare function objectTypeBuilder(): TypeBuilder<ObjectType, ObjectTypeState>; export type ObjectTypeState = { name: string; tags: Set<string>; inaccessible: boolean; hasDefinition: boolean; byGraph: MapByGraph<ObjectTypeStateInGraph>; interfaces: Set<string>; fields: Map<string, ObjectTypeFieldState>; description?: Description; ast: { directives: DirectiveNode[]; }; }; export type ObjectTypeFieldState = { name: string; type: string; tags: Set<string>; inaccessible: boolean; usedAsKey: boolean; override: string | null; byGraph: MapByGraph<FieldStateInGraph>; args: Map<string, ObjectTypeFieldArgState>; description?: Description; deprecated?: Deprecated; ast: { directives: DirectiveNode[]; }; internal: { seenNonExternal: boolean; }; }; export type ObjectTypeFieldArgState = { name: string; type: string; tags: Set<string>; inaccessible: boolean; defaultValue?: string; byGraph: MapByGraph<ArgStateInGraph>; description?: Description; deprecated?: Deprecated; ast: { directives: DirectiveNode[]; }; }; export type ObjectTypeStateInGraph = { extension: boolean; extensionType?: '@extends' | 'extend'; external: boolean; keys: Key[]; interfaces: Set<string>; inaccessible: boolean; shareable: boolean; }; type FieldStateInGraph = { type: string; external: boolean; inaccessible: boolean; used: boolean; override: string | null; provides: string | null; requires: string | null; provided: boolean; required: boolean; shareable: boolean; usedAsKey: boolean; }; type ArgStateInGraph = { type: string; inaccessible: boolean; defaultValue?: string; }; export {}; //# sourceMappingURL=object-type.d.ts.map