@netlify/content-engine
Version:
87 lines • 3 kB
TypeScript
import { DirectiveLocation } from "graphql";
import { GraphQLFieldConfigArgumentMap, GraphQLFieldConfig } from "graphql";
import { ComposeOutputType, InterfaceTypeComposer, ObjectTypeComposer, SchemaComposer } from "graphql-compose";
export interface GraphQLFieldExtensionDefinition {
name: string;
type?: ComposeOutputType<any>;
args?: GraphQLFieldConfigArgumentMap;
extend(args: GraphQLFieldConfigArgumentMap, prevFieldConfig: GraphQLFieldConfig<any, any>): any;
}
declare const inferExtensionName = "infer";
declare const dontInferExtensionName = "dontInfer";
declare const builtInFieldExtensions: {
dateformat: {
name: string;
description: string;
args: {
formatString: string;
locale: string;
fromNow: string;
difference: string;
};
extend(args: any, fieldConfig: any): {
args: Record<string, any>;
resolve: (source: any, args: any, context: any, info: any) => Promise<null | string | number | Array<string | number>>;
};
};
locale: {
description: string;
args: {
code: {
description: string;
type: string;
};
};
locations: DirectiveLocation[];
};
link: {
name: string;
description: string;
args: {
by: {
type: string;
defaultValue: string;
};
from: string;
on: string;
keepObjects: string;
};
extend(args: any, fieldConfig: any, schemaComposer: any): {
resolve: import("../type-definitions").GatsbyResolver<unknown, unknown>;
};
};
fileByRelativePath: {
name: string;
description: string;
args: {
from: string;
};
extend(args: any, fieldConfig: any): {
resolve: import("../type-definitions").GatsbyResolver<unknown, unknown>;
};
};
proxy: {
name: string;
description: string;
args: {
from: string;
};
extend(options: any, fieldConfig: any): {
resolve(source: any, args: any, context: any, info: any): any;
};
};
};
declare const internalExtensionNames: string[];
declare const reservedExtensionNames: string[];
declare const addDirectives: ({ schemaComposer, fieldExtensions, }: {
schemaComposer: SchemaComposer;
fieldExtensions: any;
}) => void;
declare const processFieldExtensions: ({ fieldExtensions, schemaComposer, typeComposer, parentSpan, }: {
fieldExtensions: any;
schemaComposer: SchemaComposer;
typeComposer: ObjectTypeComposer<any> | InterfaceTypeComposer<any>;
parentSpan: any;
}) => void;
export { addDirectives, builtInFieldExtensions, internalExtensionNames, processFieldExtensions, reservedExtensionNames, inferExtensionName, dontInferExtensionName, };
//# sourceMappingURL=index.d.ts.map