@apollo/core-schema
Version:
Apollo Core Schema processing library
32 lines • 1.33 kB
TypeScript
import { DirectiveNode, Kind, ConstDirectiveNode, ASTNode } from 'graphql';
import type { IScope } from './scope';
import { LinkUrl } from './link-url';
import { GRef, HasGref } from './gref';
import { De } from './de';
export declare const LINK_DIRECTIVES: Set<GRef>;
export declare const LINK_SPEC_URLS: Set<LinkUrl | undefined>;
export declare const ErrBadImport: (node: ASTNode, expectedKinds: ASTNode["kind"][]) => import("./error").GraphQLErrorExt<"BadImport"> & {
message: string;
node: ASTNode;
expectedKinds: Kind[];
};
export interface Link extends HasGref {
name: string;
via?: DirectiveNode;
linker?: DirectiveNode;
implicit?: boolean;
}
export declare const id: import("@protoplasm/recall").Recall<import("@protoplasm/recall").Fn>;
export declare class Linker {
#private;
readonly strap: DirectiveNode;
readonly url: LinkUrl;
private readonly urlParam;
static from(scope: IScope, dir: DirectiveNode): Linker | undefined;
static bootstrap(strap: DirectiveNode): Linker | undefined;
static readonly DEFAULT: Linker;
protected constructor(strap: DirectiveNode, url: LinkUrl, urlParam: string);
links(directive: DirectiveNode): Iterable<Link>;
synthesize(links: Iterable<Link>): Iterable<De<ConstDirectiveNode>>;
}
//# sourceMappingURL=linker.d.ts.map