Module

x/pothos/packages/core/config-store.ts>default

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
class default
import { default } from "https://dotland.deno.dev/x/pothos@release-1713397530/packages/core/config-store.ts";

Constructors

new
default()

Properties

private
fieldRefCallbacks: Map<FieldRef | InputFieldRef, ((config: PothosFieldConfig<Types>) => void)[]>
private
fieldRefs: WeakMap<FieldRef | InputFieldRef, (
name: string,
parentField: string | undefined,
typeConfig: PothosTypeConfig,
) => PothosFieldConfig<Types>>
private
fieldRefsToConfigs: Map<FieldRef | InputFieldRef, PothosFieldConfig<Types>[]>
private
fields: Map<string, Map<string, PothosFieldConfig<Types>>>
private
pending: boolean
private
pendingActions: (() => void)[]
private
pendingFields: Map<FieldRef | InputFieldRef, InputType<Types> | OutputType<Types>>
private
pendingRefResolutions: Map<ConfigurableRef<Types>, ((config: PothosTypeConfig) => void)[]>
private
refsToName: Map<ConfigurableRef<Types>, string>
private
scalarsToRefs: Map<string, BuiltinScalarRef<unknown, unknown>>
typeConfigs: Map<string, PothosTypeConfig>

Methods

private
buildField(
fieldName: string,
)
private
describeRef(ref: ConfigurableRef<Types>): string
addFieldRef(
getConfig: (
name: string,
parentField: string | undefined,
typeConfig: PothosTypeConfig,
) => PothosFieldConfig<Types>
,
)
addInterfaces(typeName: string, interfaces: InterfaceParam<Types>[] | (() => InterfaceParam<Types>[]))
addUnionTypes(typeName: string, unionTypes: ObjectParam<Types>[] | (() => ObjectParam<Types>[]))
createFieldConfig<T extends GraphQLFieldKind>(
name: string,
typeConfig: PothosTypeConfig,
parentField?: string,
kind?: T,
): Extract<PothosFieldConfig<Types>, { graphqlKind: T; }>
getFields<T extends GraphQLFieldKind>(name: string, kind?: T): Map<string, Extract<PothosFieldConfig<Types>, { graphqlKind: T; }>>
getTypeConfig<T extends PothosTypeConfig["kind"]>(ref: ConfigurableRef<Types> | string, kind?: T)
onFieldUse(ref: FieldRef | InputFieldRef, cb: (config: PothosFieldConfig<Types>) => void)
onPrepare(cb: () => void)
onTypeConfig(ref: ConfigurableRef<Types>, cb: (config: PothosTypeConfig) => void)