gatsby-source-sanity
Version:
Gatsby source plugin for building websites using Sanity.io as a backend.
20 lines (19 loc) • 885 B
TypeScript
import { GraphQLFieldConfig } from 'gatsby/graphql';
import { GatsbyContext, GatsbyOnNodeTypeContext } from './types/gatsby';
export interface PluginConfig {
projectId: string;
dataset: string;
token?: string;
version?: string;
graphqlApi: string;
overlayDrafts?: boolean;
watchMode?: boolean;
}
export declare const onPreBootstrap: (context: GatsbyContext, pluginConfig: PluginConfig) => Promise<void>;
export declare const sourceNodes: (context: GatsbyContext, pluginConfig: PluginConfig) => Promise<void>;
export declare const onPreExtractQueries: (context: GatsbyContext, pluginConfig: PluginConfig) => Promise<void>;
export declare const setFieldsOnGraphQLNodeType: (context: GatsbyContext & GatsbyOnNodeTypeContext, pluginConfig: PluginConfig) => Promise<{
[key: string]: GraphQLFieldConfig<any, any, {
[argName: string]: any;
}>;
}>;