@pothos/core
Advanced tools
Comparing version 3.40.0 to 3.40.1
# Change Log | ||
## 3.40.1 | ||
### Patch Changes | ||
- 0f5cfa9: Fix bug when decoding lists of global IDs with null items | ||
## 3.40.0 | ||
@@ -4,0 +10,0 @@ |
@@ -11,4 +11,4 @@ import FieldRef from '../refs/field'; | ||
protected createField<Args extends InputFieldMap, Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>>(options: PothosSchemaTypes.FieldOptions<Types, ParentShape, Type, Nullable, Args, any, {}>): FieldRef<ShapeFromTypeParam<Types, Type, Nullable>, Kind>; | ||
protected exposeField<Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, Name extends keyof ParentShape & string>(name: Name, { extensions, ...options }: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, ParentShape, Type, Nullable, {}, {}>, 'resolve'>): FieldRef<ShapeFromTypeParam<Types, Type, Nullable>, Kind>; | ||
protected exposeField<Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, Name extends string & keyof ParentShape>(name: Name, { extensions, ...options }: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, ParentShape, Type, Nullable, {}, {}>, 'resolve'>): FieldRef<ShapeFromTypeParam<Types, Type, Nullable>, Kind>; | ||
} | ||
//# sourceMappingURL=base.d.ts.map |
@@ -10,3 +10,3 @@ import { CompatibleTypes, ExposeNullability, FieldKind, FieldNullability, FieldOptionsFromKind, NormalizeArgs, SchemaTypes, TypeParam } from '../types'; | ||
exposeBoolean<Name extends CompatibleTypes<Types, ParentShape, 'Boolean', true>, ResolveReturnShape, Nullable extends FieldNullability<'Boolean'> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, 'Boolean', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, 'Boolean', ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, 'Boolean', ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, 'Boolean', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<FieldNullability<"Boolean"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("Boolean" extends infer T ? T extends "Boolean" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T> : never : never : never) | null | undefined : "Boolean" extends infer T_1 ? T_1 extends "Boolean" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("Boolean" extends infer T_2 ? T_2 extends "Boolean" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "Boolean" extends infer T_3 ? T_3 extends "Boolean" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -19,3 +19,3 @@ /** | ||
exposeFloat<Name extends CompatibleTypes<Types, ParentShape, 'Float', true>, ResolveReturnShape, Nullable extends FieldNullability<'Float'> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, 'Float', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, 'Float', ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, 'Float', ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, 'Float', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<FieldNullability<"Float"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("Float" extends infer T ? T extends "Float" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T> : never : never : never) | null | undefined : "Float" extends infer T_1 ? T_1 extends "Float" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("Float" extends infer T_2 ? T_2 extends "Float" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "Float" extends infer T_3 ? T_3 extends "Float" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -28,3 +28,3 @@ /** | ||
exposeID<Name extends CompatibleTypes<Types, ParentShape, 'ID', true>, ResolveReturnShape, Nullable extends FieldNullability<'ID'> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, 'ID', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, 'ID', ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, 'ID', ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, 'ID', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<FieldNullability<"ID"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("ID" extends infer T ? T extends "ID" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T> : never : never : never) | null | undefined : "ID" extends infer T_1 ? T_1 extends "ID" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("ID" extends infer T_2 ? T_2 extends "ID" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "ID" extends infer T_3 ? T_3 extends "ID" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -37,3 +37,3 @@ /** | ||
exposeInt<Name extends CompatibleTypes<Types, ParentShape, 'Int', true>, ResolveReturnShape, Nullable extends FieldNullability<'Int'> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, 'Int', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, 'Int', ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, 'Int', ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, 'Int', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<FieldNullability<"Int"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("Int" extends infer T ? T extends "Int" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T> : never : never : never) | null | undefined : "Int" extends infer T_1 ? T_1 extends "Int" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("Int" extends infer T_2 ? T_2 extends "Int" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "Int" extends infer T_3 ? T_3 extends "Int" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -46,3 +46,3 @@ /** | ||
exposeString<Name extends CompatibleTypes<Types, ParentShape, 'String', true>, ResolveReturnShape, Nullable extends FieldNullability<'String'> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, 'String', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, 'String', ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, 'String', ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, 'String', Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<FieldNullability<"String"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("String" extends infer T ? T extends "String" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T> : never : never : never) | null | undefined : "String" extends infer T_1 ? T_1 extends "String" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("String" extends infer T_2 ? T_2 extends "String" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "String" extends infer T_3 ? T_3 extends "String" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types").BaseEnum ? import("../types").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -58,5 +58,5 @@ /** | ||
}>, ResolveReturnShape, Nullable extends FieldNullability<['Boolean']> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, ['Boolean'], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
'Boolean' | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, ['Boolean'], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, ["Boolean"], Nullable>, Kind>; | ||
@@ -72,5 +72,5 @@ /** | ||
}>, ResolveReturnShape, Nullable extends FieldNullability<['Float']> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, ['Float'], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
'Float' | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, ['Float'], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, ["Float"], Nullable>, Kind>; | ||
@@ -86,5 +86,5 @@ /** | ||
}>, ResolveReturnShape, Nullable extends FieldNullability<['ID']> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, ['ID'], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
'ID' | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, ['ID'], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, ["ID"], Nullable>, Kind>; | ||
@@ -100,5 +100,5 @@ /** | ||
}>, ResolveReturnShape, Nullable extends FieldNullability<['Int']> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, ['Int'], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
'Int' | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, ['Int'], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, ["Int"], Nullable>, Kind>; | ||
@@ -114,5 +114,5 @@ /** | ||
}>, ResolveReturnShape, Nullable extends FieldNullability<['String']> = Types['DefaultFieldNullability']>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, ['String'], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
'String' | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'type' | 'nullable'> & ExposeNullability<Types, ['String'], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve' | 'type'> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, ["String"], Nullable>, Kind>; | ||
@@ -128,4 +128,4 @@ /** | ||
} : true>>(name: Name extends keyof ParentShape ? Name : keyof ParentShape, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'resolve' | 'nullable'> & ExposeNullability<Types, Type, ParentShape, Name, Nullable> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>["type"], (Nullable & false & (Type extends [unknown] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [T] extends [NonNullable<T>] ? (readonly T[] | null | undefined) & Awaited<ParentShape[Name]> extends readonly T[] & Awaited<ParentShape[Name]> ? boolean | { | ||
options: ExposeNullability<Types, Type, ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>, 'nullable' | 'resolve'> | ||
]>): import("..").FieldRef<import("../types").ShapeFromTypeParam<Types, FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>["type"], (false & (Type extends [unknown] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [T] extends [NonNullable<T>] ? (readonly T[] | null | undefined) & Awaited<ParentShape[Name]> extends readonly T[] & Awaited<ParentShape[Name]> ? boolean | { | ||
items: boolean; | ||
@@ -142,3 +142,3 @@ list: boolean; | ||
list: true; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true)) | (Nullable & true & (Type extends [unknown] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [T] extends [NonNullable<T>] ? (readonly T[] | null | undefined) & Awaited<ParentShape[Name]> extends readonly T[] & Awaited<ParentShape[Name]> ? boolean | { | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true) & Nullable) | (true & (Type extends [unknown] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [T] extends [NonNullable<T>] ? (readonly T[] | null | undefined) & Awaited<ParentShape[Name]> extends readonly T[] & Awaited<ParentShape[Name]> ? boolean | { | ||
items: boolean; | ||
@@ -155,3 +155,3 @@ list: boolean; | ||
list: true; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true)) | (Nullable & (Type extends [unknown] ? boolean | { | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true) & Nullable) | ((Type extends [unknown] ? boolean | { | ||
items: boolean; | ||
@@ -171,4 +171,4 @@ list: boolean; | ||
list: true; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true))>, Kind>; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true) & Nullable)>, Kind>; | ||
} | ||
//# sourceMappingURL=builder.d.ts.map |
export default class BaseTypeRef implements PothosSchemaTypes.BaseTypeRef { | ||
kind: "Enum" | "InputObject" | "Interface" | "Object" | "Scalar" | "Union" | "List" | "InputList"; | ||
kind: "Enum" | "InputList" | "InputObject" | "Interface" | "List" | "Object" | "Scalar" | "Union"; | ||
name: string; | ||
constructor(kind: 'Enum' | 'InputObject' | 'Interface' | 'Object' | 'Scalar' | 'Union' | 'List' | 'InputList', name: string); | ||
constructor(kind: 'Enum' | 'InputList' | 'InputObject' | 'Interface' | 'List' | 'Object' | 'Scalar' | 'Union', name: string); | ||
toString(): string; | ||
} | ||
//# sourceMappingURL=base.d.ts.map |
@@ -46,3 +46,3 @@ import type { GraphQLResolveInfo } from 'graphql'; | ||
}> : PothosSchemaTypes.EnumTypeOptions<Types, Values>; | ||
export type ArgBuilder<Types extends SchemaTypes> = PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>['field'] & Omit<PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>, 'field'>; | ||
export type ArgBuilder<Types extends SchemaTypes> = Omit<PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>, 'field'> & PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>['field']; | ||
export type ValidateInterfaces<Shape, Types extends SchemaTypes, Interfaces extends InterfaceParam<Types>> = Interfaces extends InterfaceParam<Types> ? Shape extends GetParentShape<Types, Interfaces> ? Interfaces : 'Object shape must extend interface shape' : never; | ||
@@ -64,5 +64,5 @@ export type InputShapeFromFields<Fields extends InputFieldMap> = NormalizeNullableFields<{ | ||
export type ExposeNullability<Types extends SchemaTypes, Type extends TypeParam<Types>, ParentShape, Name extends keyof ParentShape, Nullable extends FieldNullability<Type>> = Awaited<ParentShape[Name]> extends ShapeFromTypeParam<Types, Type, Nullable> ? { | ||
nullable?: Nullable & ExposeNullableOption<Types, Type, ParentShape, Name>; | ||
nullable?: ExposeNullableOption<Types, Type, ParentShape, Name> & Nullable; | ||
} : { | ||
nullable: Nullable & ExposeNullableOption<Types, Type, ParentShape, Name>; | ||
nullable: ExposeNullableOption<Types, Type, ParentShape, Name> & Nullable; | ||
}; | ||
@@ -69,0 +69,0 @@ export type ExposeNullableOption<Types extends SchemaTypes, Type extends TypeParam<Types>, ParentShape, Name extends keyof ParentShape> = FieldNullability<Type> & (Type extends [unknown] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [T] extends [NonNullable<T>] ? Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean | { |
@@ -40,3 +40,3 @@ import type { GraphQLIsTypeOfFn, GraphQLResolveInfo, GraphQLScalarLiteralParser, GraphQLScalarValueParser, GraphQLUnionType } from 'graphql'; | ||
fields?: InterfaceFieldsShape<Types, Shape>; | ||
interfaces?: (Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]) | (() => Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]); | ||
interfaces?: (() => Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]) | (Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]); | ||
resolveType?: ResolveType & ((parent: Shape, context: Types['Context'], info: GraphQLResolveInfo, type: GraphQLUnionType) => MaybePromise<ObjectParam<Types> | string | null | undefined>); | ||
@@ -43,0 +43,0 @@ } |
@@ -41,3 +41,3 @@ import type InterfaceRef from '../refs/interface'; | ||
name: string; | ||
kind: 'Enum' | 'InputObject' | 'Scalar' | 'InputList'; | ||
kind: 'Enum' | 'InputList' | 'InputObject' | 'Scalar'; | ||
} | ||
@@ -44,0 +44,0 @@ export type OutputType<Types extends SchemaTypes> = BaseEnum | keyof Types['outputShapes'] | (new (...args: any[]) => any) | { |
@@ -15,3 +15,3 @@ import { InputType, InputTypeParam, OutputType, SchemaTypes, TypeParam } from '../types'; | ||
export declare function getTypeBrand(val: unknown): OutputType<SchemaTypes> | null; | ||
export declare function unwrapListParam<Types extends SchemaTypes>(param: TypeParam<Types> | InputTypeParam<Types>): OutputType<Types> | InputType<Types>; | ||
export declare function unwrapListParam<Types extends SchemaTypes>(param: InputTypeParam<Types> | TypeParam<Types>): InputType<Types> | OutputType<Types>; | ||
export declare function unwrapOutputListParam<Types extends SchemaTypes>(param: TypeParam<Types>): OutputType<Types>; | ||
@@ -23,3 +23,3 @@ export declare function unwrapInputListParam<Types extends SchemaTypes>(param: InputTypeParam<Types>): InputType<Types>; | ||
*/ | ||
export declare function completeValue<T, R>(valOrPromise: PromiseLike<T> | T, onSuccess: (completedVal: T) => R, onError?: (errVal: unknown) => R): R | Promise<R>; | ||
export declare function completeValue<T, R>(valOrPromise: PromiseLike<T> | T, onSuccess: (completedVal: T) => R, onError?: (errVal: unknown) => R): Promise<R> | R; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -11,4 +11,4 @@ import FieldRef from '../refs/field.js'; | ||
protected createField<Args extends InputFieldMap, Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>>(options: PothosSchemaTypes.FieldOptions<Types, ParentShape, Type, Nullable, Args, any, {}>): FieldRef<ShapeFromTypeParam<Types, Type, Nullable>, Kind>; | ||
protected exposeField<Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, Name extends keyof ParentShape & string>(name: Name, { extensions, ...options }: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, ParentShape, Type, Nullable, {}, {}>, "resolve">): FieldRef<ShapeFromTypeParam<Types, Type, Nullable>, Kind>; | ||
protected exposeField<Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, Name extends string & keyof ParentShape>(name: Name, { extensions, ...options }: Omit<PothosSchemaTypes.ObjectFieldOptions<Types, ParentShape, Type, Nullable, {}, {}>, "resolve">): FieldRef<ShapeFromTypeParam<Types, Type, Nullable>, Kind>; | ||
} | ||
//# sourceMappingURL=base.d.ts.map |
@@ -10,3 +10,3 @@ import { CompatibleTypes, ExposeNullability, FieldKind, FieldNullability, FieldOptionsFromKind, NormalizeArgs, SchemaTypes, TypeParam } from '../types/index.js'; | ||
exposeBoolean<Name extends CompatibleTypes<Types, ParentShape, "Boolean", true>, ResolveReturnShape, Nullable extends FieldNullability<"Boolean"> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, "Boolean", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, "Boolean", ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, "Boolean", ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, "Boolean", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<FieldNullability<"Boolean"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("Boolean" extends infer T ? T extends "Boolean" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T> : never : never : never) | null | undefined : "Boolean" extends infer T_1 ? T_1 extends "Boolean" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("Boolean" extends infer T_2 ? T_2 extends "Boolean" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "Boolean" extends infer T_3 ? T_3 extends "Boolean" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -19,3 +19,3 @@ /** | ||
exposeFloat<Name extends CompatibleTypes<Types, ParentShape, "Float", true>, ResolveReturnShape, Nullable extends FieldNullability<"Float"> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, "Float", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, "Float", ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, "Float", ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, "Float", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<FieldNullability<"Float"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("Float" extends infer T ? T extends "Float" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T> : never : never : never) | null | undefined : "Float" extends infer T_1 ? T_1 extends "Float" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("Float" extends infer T_2 ? T_2 extends "Float" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "Float" extends infer T_3 ? T_3 extends "Float" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -28,3 +28,3 @@ /** | ||
exposeID<Name extends CompatibleTypes<Types, ParentShape, "ID", true>, ResolveReturnShape, Nullable extends FieldNullability<"ID"> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, "ID", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, "ID", ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, "ID", ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, "ID", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<FieldNullability<"ID"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("ID" extends infer T ? T extends "ID" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T> : never : never : never) | null | undefined : "ID" extends infer T_1 ? T_1 extends "ID" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("ID" extends infer T_2 ? T_2 extends "ID" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "ID" extends infer T_3 ? T_3 extends "ID" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -37,3 +37,3 @@ /** | ||
exposeInt<Name extends CompatibleTypes<Types, ParentShape, "Int", true>, ResolveReturnShape, Nullable extends FieldNullability<"Int"> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, "Int", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, "Int", ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, "Int", ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, "Int", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<FieldNullability<"Int"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("Int" extends infer T ? T extends "Int" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T> : never : never : never) | null | undefined : "Int" extends infer T_1 ? T_1 extends "Int" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("Int" extends infer T_2 ? T_2 extends "Int" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "Int" extends infer T_3 ? T_3 extends "Int" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -46,3 +46,3 @@ /** | ||
exposeString<Name extends CompatibleTypes<Types, ParentShape, "String", true>, ResolveReturnShape, Nullable extends FieldNullability<"String"> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, "String", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, "String", ParentShape, Name, Nullable> | ||
options: ExposeNullability<Types, "String", ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, "String", Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<FieldNullability<"String"> extends Nullable ? Types["DefaultFieldNullability"] extends true ? ("String" extends infer T ? T extends "String" ? T extends keyof Types["outputShapes"] ? Types["outputShapes"][T] : T extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T> : never : never : never) | null | undefined : "String" extends infer T_1 ? T_1 extends "String" ? T_1 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_1] : T_1 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_1> : never : never : never : Nullable extends true ? ("String" extends infer T_2 ? T_2 extends "String" ? T_2 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_2] : T_2 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_2> : never : never : never) | null | undefined : "String" extends infer T_3 ? T_3 extends "String" ? T_3 extends keyof Types["outputShapes"] ? Types["outputShapes"][T_3] : T_3 extends import("../types/index.js").BaseEnum ? import("../types/index.js").ValuesFromEnum<T_3> : never : never : never, Kind>; | ||
@@ -62,7 +62,7 @@ /** | ||
]> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, [ | ||
"Boolean" | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, [ | ||
], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
"Boolean" | ||
], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, [ | ||
@@ -84,7 +84,7 @@ "Boolean" | ||
]> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, [ | ||
"Float" | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, [ | ||
], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
"Float" | ||
], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, [ | ||
@@ -106,7 +106,7 @@ "Float" | ||
]> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, [ | ||
"ID" | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, [ | ||
], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
"ID" | ||
], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, [ | ||
@@ -128,7 +128,7 @@ "ID" | ||
]> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, [ | ||
"Int" | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, [ | ||
], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
"Int" | ||
], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, [ | ||
@@ -150,7 +150,7 @@ "Int" | ||
]> = Types["DefaultFieldNullability"]>(name: Name, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
options: ExposeNullability<Types, [ | ||
"String" | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "type" | "nullable"> & ExposeNullability<Types, [ | ||
], ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, [ | ||
"String" | ||
], ParentShape, Name, Nullable> | ||
], Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve" | "type"> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, [ | ||
@@ -170,4 +170,4 @@ "String" | ||
} : true>>(name: Name extends keyof ParentShape ? Name : keyof ParentShape, ...args: NormalizeArgs<[ | ||
options: Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "resolve" | "nullable"> & ExposeNullability<Types, Type, ParentShape, Name, Nullable> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>["type"], (Nullable & false & (Type extends [ | ||
options: ExposeNullability<Types, Type, ParentShape, Name, Nullable> & Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>, "nullable" | "resolve"> | ||
]>): import("../index.js").FieldRef<import("../types/index.js").ShapeFromTypeParam<Types, FieldOptionsFromKind<Types, ParentShape, Type, Nullable, {}, Kind, ParentShape, ResolveReturnShape>["type"], (false & (Type extends [ | ||
unknown | ||
@@ -190,3 +190,3 @@ ] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [ | ||
list: true; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true)) | (Nullable & true & (Type extends [ | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true) & Nullable) | (true & (Type extends [ | ||
unknown | ||
@@ -209,3 +209,3 @@ ] ? Awaited<ParentShape[Name]> extends readonly (infer T)[] | null | undefined ? [ | ||
list: true; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true)) | (Nullable & (Type extends [ | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true) & Nullable) | ((Type extends [ | ||
unknown | ||
@@ -233,4 +233,4 @@ ] ? boolean | { | ||
list: true; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true))>, Kind>; | ||
} : never : Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> ? boolean : true) & Nullable)>, Kind>; | ||
} | ||
//# sourceMappingURL=builder.d.ts.map |
export default class BaseTypeRef implements PothosSchemaTypes.BaseTypeRef { | ||
kind: "Enum" | "InputObject" | "Interface" | "Object" | "Scalar" | "Union" | "List" | "InputList"; | ||
kind: "Enum" | "InputList" | "InputObject" | "Interface" | "List" | "Object" | "Scalar" | "Union"; | ||
name: string; | ||
constructor(kind: "Enum" | "InputObject" | "Interface" | "Object" | "Scalar" | "Union" | "List" | "InputList", name: string); | ||
constructor(kind: "Enum" | "InputList" | "InputObject" | "Interface" | "List" | "Object" | "Scalar" | "Union", name: string); | ||
toString(): string; | ||
} | ||
//# sourceMappingURL=base.d.ts.map |
@@ -50,3 +50,3 @@ import type { GraphQLResolveInfo } from 'graphql'; | ||
}> : PothosSchemaTypes.EnumTypeOptions<Types, Values>; | ||
export type ArgBuilder<Types extends SchemaTypes> = PothosSchemaTypes.InputFieldBuilder<Types, "Arg">["field"] & Omit<PothosSchemaTypes.InputFieldBuilder<Types, "Arg">, "field">; | ||
export type ArgBuilder<Types extends SchemaTypes> = Omit<PothosSchemaTypes.InputFieldBuilder<Types, "Arg">, "field"> & PothosSchemaTypes.InputFieldBuilder<Types, "Arg">["field"]; | ||
export type ValidateInterfaces<Shape, Types extends SchemaTypes, Interfaces extends InterfaceParam<Types>> = Interfaces extends InterfaceParam<Types> ? Shape extends GetParentShape<Types, Interfaces> ? Interfaces : "Object shape must extend interface shape" : never; | ||
@@ -68,5 +68,5 @@ export type InputShapeFromFields<Fields extends InputFieldMap> = NormalizeNullableFields<{ | ||
export type ExposeNullability<Types extends SchemaTypes, Type extends TypeParam<Types>, ParentShape, Name extends keyof ParentShape, Nullable extends FieldNullability<Type>> = Awaited<ParentShape[Name]> extends ShapeFromTypeParam<Types, Type, Nullable> ? { | ||
nullable?: Nullable & ExposeNullableOption<Types, Type, ParentShape, Name>; | ||
nullable?: ExposeNullableOption<Types, Type, ParentShape, Name> & Nullable; | ||
} : { | ||
nullable: Nullable & ExposeNullableOption<Types, Type, ParentShape, Name>; | ||
nullable: ExposeNullableOption<Types, Type, ParentShape, Name> & Nullable; | ||
}; | ||
@@ -73,0 +73,0 @@ export type ExposeNullableOption<Types extends SchemaTypes, Type extends TypeParam<Types>, ParentShape, Name extends keyof ParentShape> = FieldNullability<Type> & (Type extends [ |
@@ -40,3 +40,3 @@ import type { GraphQLIsTypeOfFn, GraphQLResolveInfo, GraphQLScalarLiteralParser, GraphQLScalarValueParser, GraphQLUnionType } from 'graphql'; | ||
fields?: InterfaceFieldsShape<Types, Shape>; | ||
interfaces?: (Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]) | (() => Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]); | ||
interfaces?: (() => Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]) | (Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]); | ||
resolveType?: ResolveType & ((parent: Shape, context: Types["Context"], info: GraphQLResolveInfo, type: GraphQLUnionType) => MaybePromise<ObjectParam<Types> | string | null | undefined>); | ||
@@ -43,0 +43,0 @@ } |
@@ -41,3 +41,3 @@ import type InterfaceRef from '../refs/interface.js'; | ||
name: string; | ||
kind: "Enum" | "InputObject" | "Scalar" | "InputList"; | ||
kind: "Enum" | "InputList" | "InputObject" | "Scalar"; | ||
} | ||
@@ -44,0 +44,0 @@ export type OutputType<Types extends SchemaTypes> = BaseEnum | keyof Types["outputShapes"] | (new (...args: any[]) => any) | { |
@@ -15,3 +15,3 @@ import { InputType, InputTypeParam, OutputType, SchemaTypes, TypeParam } from '../types/index.js'; | ||
export declare function getTypeBrand(val: unknown): OutputType<SchemaTypes> | null; | ||
export declare function unwrapListParam<Types extends SchemaTypes>(param: TypeParam<Types> | InputTypeParam<Types>): OutputType<Types> | InputType<Types>; | ||
export declare function unwrapListParam<Types extends SchemaTypes>(param: InputTypeParam<Types> | TypeParam<Types>): InputType<Types> | OutputType<Types>; | ||
export declare function unwrapOutputListParam<Types extends SchemaTypes>(param: TypeParam<Types>): OutputType<Types>; | ||
@@ -23,3 +23,3 @@ export declare function unwrapInputListParam<Types extends SchemaTypes>(param: InputTypeParam<Types>): InputType<Types>; | ||
*/ | ||
export declare function completeValue<T, R>(valOrPromise: PromiseLike<T> | T, onSuccess: (completedVal: T) => R, onError?: (errVal: unknown) => R): R | Promise<R>; | ||
export declare function completeValue<T, R>(valOrPromise: PromiseLike<T> | T, onSuccess: (completedVal: T) => R, onError?: (errVal: unknown) => R): Promise<R> | R; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -112,3 +112,3 @@ import { PothosSchemaError } from '../errors.js'; | ||
if (field.kind !== "InputObject" || field.value !== null) { | ||
mapped[fieldName] = field.isList ? fieldVal.map((val) => mapValue(val, field, ...args)) : mapValue(fieldVal, field, ...args); | ||
mapped[fieldName] = field.isList ? fieldVal.map((val) => val == null ? val : mapValue(val, field, ...args)) : mapValue(fieldVal, field, ...args); | ||
} | ||
@@ -115,0 +115,0 @@ }); |
@@ -132,3 +132,3 @@ "use strict"; | ||
if (field.kind !== 'InputObject' || field.value !== null) { | ||
mapped[fieldName] = field.isList ? fieldVal.map((val)=>mapValue(val, field, ...args)) : mapValue(fieldVal, field, ...args); | ||
mapped[fieldName] = field.isList ? fieldVal.map((val)=>val == null ? val : mapValue(val, field, ...args)) : mapValue(fieldVal, field, ...args); | ||
} | ||
@@ -135,0 +135,0 @@ }); |
{ | ||
"name": "@pothos/core", | ||
"version": "3.40.0", | ||
"version": "3.40.1", | ||
"description": "Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -113,3 +113,3 @@ import { defaultFieldResolver } from 'graphql'; | ||
Nullable extends FieldNullability<Type>, | ||
Name extends keyof ParentShape & string, | ||
Name extends string & keyof ParentShape, | ||
>( | ||
@@ -116,0 +116,0 @@ name: Name, |
@@ -31,16 +31,16 @@ import { | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'Boolean', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, 'Boolean', ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'Boolean', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, 'Boolean', ParentShape, Name, Nullable>, | ||
] | ||
@@ -67,16 +67,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'Float', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, 'Float', ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'Float', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, 'Float', ParentShape, Name, Nullable>, | ||
] | ||
@@ -103,16 +103,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'ID', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, 'ID', ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'ID', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, 'ID', ParentShape, Name, Nullable>, | ||
] | ||
@@ -139,16 +139,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'Int', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, 'Int', ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'Int', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, 'Int', ParentShape, Name, Nullable>, | ||
] | ||
@@ -175,16 +175,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'String', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, 'String', ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
'String', | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, 'String', ParentShape, Name, Nullable>, | ||
] | ||
@@ -211,16 +211,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['Boolean'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, ['Boolean'], ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['Boolean'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, ['Boolean'], ParentShape, Name, Nullable>, | ||
] | ||
@@ -247,16 +247,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['Float'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, ['Float'], ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['Float'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, ['Float'], ParentShape, Name, Nullable>, | ||
] | ||
@@ -283,16 +283,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['ID'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, ['ID'], ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['ID'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, ['ID'], ParentShape, Name, Nullable>, | ||
] | ||
@@ -319,16 +319,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['Int'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, ['Int'], ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['Int'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, ['Int'], ParentShape, Name, Nullable>, | ||
] | ||
@@ -355,16 +355,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['String'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, ['String'], ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
['String'], | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | 'type' | ||
>, | ||
'resolve' | 'type' | 'nullable' | ||
> & | ||
ExposeNullability<Types, ['String'], ParentShape, Name, Nullable>, | ||
] | ||
@@ -397,16 +397,16 @@ > | ||
[ | ||
options: Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
Type, | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
options: ExposeNullability<Types, Type, ParentShape, Name, Nullable> & | ||
Omit< | ||
FieldOptionsFromKind< | ||
Types, | ||
ParentShape, | ||
Type, | ||
Nullable, | ||
{}, | ||
Kind, | ||
ParentShape, | ||
ResolveReturnShape | ||
>, | ||
'nullable' | 'resolve' | ||
>, | ||
'resolve' | 'nullable' | ||
> & | ||
ExposeNullability<Types, Type, ParentShape, Name, Nullable>, | ||
] | ||
@@ -413,0 +413,0 @@ > |
@@ -9,9 +9,9 @@ export default class BaseTypeRef implements PothosSchemaTypes.BaseTypeRef { | ||
| 'Enum' | ||
| 'InputList' | ||
| 'InputObject' | ||
| 'Interface' | ||
| 'List' | ||
| 'Object' | ||
| 'Scalar' | ||
| 'Union' | ||
| 'List' | ||
| 'InputList', | ||
| 'Union', | ||
name: string, | ||
@@ -18,0 +18,0 @@ ) { |
@@ -43,8 +43,8 @@ import type { GraphQLResolveInfo } from 'graphql'; | ||
: null extends Type | ||
? Return extends MaybePromise<readonly MaybePromise<Item>[] | null | undefined> | ||
? Return | ||
: MaybePromise<readonly MaybePromise<Item>[]> | null | undefined | ||
: Return extends MaybePromise<readonly MaybePromise<Item>[]> | ||
? Return | ||
: MaybePromise<readonly MaybePromise<Item>[]>; | ||
? Return extends MaybePromise<readonly MaybePromise<Item>[] | null | undefined> | ||
? Return | ||
: MaybePromise<readonly MaybePromise<Item>[]> | null | undefined | ||
: Return extends MaybePromise<readonly MaybePromise<Item>[]> | ||
? Return | ||
: MaybePromise<readonly MaybePromise<Item>[]>; | ||
@@ -75,6 +75,6 @@ export type GeneratorResolver<Type, Item> = null extends Type | ||
: Values extends EnumValueConfigMap<Types> | ||
? { | ||
[K in keyof Values]: Values[K]['value'] extends number | string ? Values[K]['value'] : K; | ||
}[keyof Values] | ||
: never; | ||
? { | ||
[K in keyof Values]: Values[K]['value'] extends number | string ? Values[K]['value'] : K; | ||
}[keyof Values] | ||
: never; | ||
@@ -156,4 +156,4 @@ export type ObjectFieldsShape<Types extends SchemaTypes, Shape> = ( | ||
: Param extends ObjectRef<unknown> | ||
? { name?: string } | ||
: { name: string }) & | ||
? { name?: string } | ||
: { name: string }) & | ||
( | ||
@@ -175,4 +175,4 @@ | PothosSchemaTypes.ObjectTypeOptions<Types, Shape> | ||
: Param extends InterfaceRef<unknown> | ||
? { name?: string } | ||
: { name: string }); | ||
? { name?: string } | ||
: { name: string }); | ||
@@ -194,7 +194,7 @@ export type EnumTypeOptions< | ||
export type ArgBuilder<Types extends SchemaTypes> = PothosSchemaTypes.InputFieldBuilder< | ||
Types, | ||
'Arg' | ||
>['field'] & | ||
Omit<PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>, 'field'>; | ||
export type ArgBuilder<Types extends SchemaTypes> = Omit< | ||
PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>, | ||
'field' | ||
> & | ||
PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>['field']; | ||
@@ -266,6 +266,6 @@ export type ValidateInterfaces< | ||
? { | ||
nullable?: Nullable & ExposeNullableOption<Types, Type, ParentShape, Name>; | ||
nullable?: ExposeNullableOption<Types, Type, ParentShape, Name> & Nullable; | ||
} | ||
: { | ||
nullable: Nullable & ExposeNullableOption<Types, Type, ParentShape, Name>; | ||
nullable: ExposeNullableOption<Types, Type, ParentShape, Name> & Nullable; | ||
}; | ||
@@ -286,7 +286,7 @@ | ||
: Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> | ||
? { items: true; list: boolean } | ||
: { items: true; list: true } | ||
? { items: true; list: boolean } | ||
: { items: true; list: true } | ||
: never | ||
: Awaited<ParentShape[Name]> extends NonNullable<Awaited<ParentShape[Name]>> | ||
? boolean | ||
: true); | ||
? boolean | ||
: true); |
@@ -86,4 +86,4 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
interfaces?: | ||
| (Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]) | ||
| (() => Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]); | ||
| (() => Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]) | ||
| (Interfaces & ValidateInterfaces<Shape, Types, Interfaces[number]>[]); | ||
resolveType?: ResolveType & | ||
@@ -90,0 +90,0 @@ (( |
@@ -18,12 +18,12 @@ import type InterfaceRef from '../refs/interface'; | ||
: T extends new (...args: any[]) => infer U | ||
? U extends { | ||
[outputShapeKey]: infer V; | ||
} | ||
? V | ||
: U | ||
: T extends keyof Types['outputShapes'] | ||
? Types['outputShapes'][T] | ||
: T extends BaseEnum | ||
? ValuesFromEnum<T> | ||
: never; | ||
? U extends { | ||
[outputShapeKey]: infer V; | ||
} | ||
? V | ||
: U | ||
: T extends keyof Types['outputShapes'] | ||
? Types['outputShapes'][T] | ||
: T extends BaseEnum | ||
? ValuesFromEnum<T> | ||
: never; | ||
@@ -53,12 +53,12 @@ export type ParentShape<Types extends SchemaTypes, T> = T extends { | ||
: T extends new (...args: any[]) => infer U | ||
? U extends { | ||
[inputShapeKey]: infer V; | ||
} | ||
? V | ||
: U | ||
: T extends keyof Types['inputShapes'] | ||
? Types['inputShapes'][T] | ||
: T extends BaseEnum | ||
? ValuesFromEnum<T> | ||
: never; | ||
? U extends { | ||
[inputShapeKey]: infer V; | ||
} | ||
? V | ||
: U | ||
: T extends keyof Types['inputShapes'] | ||
? Types['inputShapes'][T] | ||
: T extends BaseEnum | ||
? ValuesFromEnum<T> | ||
: never; | ||
@@ -82,3 +82,3 @@ export interface OutputRefShape<T> { | ||
name: string; | ||
kind: 'Enum' | 'InputObject' | 'Scalar' | 'InputList'; | ||
kind: 'Enum' | 'InputList' | 'InputObject' | 'Scalar'; | ||
} | ||
@@ -139,4 +139,4 @@ | ||
: Nullable extends true | ||
? Shape | null | undefined | ||
: Shape; | ||
? Shape | null | undefined | ||
: Shape; | ||
@@ -150,8 +150,8 @@ export type ShapeFromTypeParam< | ||
: FieldNullability<Param> extends Nullable | ||
? Types['DefaultFieldNullability'] extends true | ||
? OutputShape<Types, Param> | null | undefined | ||
: OutputShape<Types, Param> | ||
: Nullable extends true | ||
? OutputShape<Types, Param> | null | undefined | ||
: OutputShape<Types, Param>; | ||
? Types['DefaultFieldNullability'] extends true | ||
? OutputShape<Types, Param> | null | undefined | ||
: OutputShape<Types, Param> | ||
: Nullable extends true | ||
? OutputShape<Types, Param> | null | undefined | ||
: OutputShape<Types, Param>; | ||
@@ -167,15 +167,15 @@ export type ShapeFromListTypeParam< | ||
: Nullable extends true | ||
? readonly OutputShape<Types, Param[0]>[] | null | undefined | ||
: Nullable extends false | ||
? readonly OutputShape<Types, Param[0]>[] | ||
: Nullable extends { list: infer List; items: infer Items } | ||
? Items extends boolean | ||
? List extends true | ||
? | ||
| readonly ShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
| null | ||
| undefined | ||
: readonly ShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
: never | ||
: never; | ||
? readonly OutputShape<Types, Param[0]>[] | null | undefined | ||
: Nullable extends false | ||
? readonly OutputShape<Types, Param[0]>[] | ||
: Nullable extends { list: infer List; items: infer Items } | ||
? Items extends boolean | ||
? List extends true | ||
? | ||
| readonly ShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
| null | ||
| undefined | ||
: readonly ShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
: never | ||
: never; | ||
@@ -200,8 +200,8 @@ export type FieldNullability<Param> = | ||
: FieldRequiredness<Param> extends Required | ||
? Types['DefaultInputFieldRequiredness'] extends false | ||
? InputShape<Types, Param> | null | undefined | ||
: InputShape<Types, Param> | ||
: Required extends true | ||
? InputShape<Types, Param> | ||
: InputShape<Types, Param> | null | undefined; | ||
? Types['DefaultInputFieldRequiredness'] extends false | ||
? InputShape<Types, Param> | null | undefined | ||
: InputShape<Types, Param> | ||
: Required extends true | ||
? InputShape<Types, Param> | ||
: InputShape<Types, Param> | null | undefined; | ||
@@ -217,17 +217,17 @@ export type InputShapeFromListTypeParam< | ||
: Required extends true | ||
? InputShape<Types, Param[0]>[] | ||
: Required extends false | ||
? InputShape<Types, Param[0]>[] | null | undefined | ||
: FieldRequiredness<Param> extends Required | ||
? InputShape<Types, Param[0]>[] | null | undefined | ||
: Required extends boolean | { list: infer List; items: infer Items } | ||
? Items extends boolean | ||
? List extends true | ||
? InputShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
: | ||
| InputShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
| null | ||
| undefined | ||
: never | ||
: never; | ||
? InputShape<Types, Param[0]>[] | ||
: Required extends false | ||
? InputShape<Types, Param[0]>[] | null | undefined | ||
: FieldRequiredness<Param> extends Required | ||
? InputShape<Types, Param[0]>[] | null | undefined | ||
: Required extends boolean | { list: infer List; items: infer Items } | ||
? Items extends boolean | ||
? List extends true | ||
? InputShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
: | ||
| InputShapeFromTypeParam<Types, Param[0], Items extends false ? false : true>[] | ||
| null | ||
| undefined | ||
: never | ||
: never; | ||
@@ -234,0 +234,0 @@ export type FieldRequiredness<Param> = |
@@ -101,4 +101,4 @@ import { PothosSchemaError, PothosValidationError } from '../errors'; | ||
export function unwrapListParam<Types extends SchemaTypes>( | ||
param: TypeParam<Types> | InputTypeParam<Types>, | ||
): OutputType<Types> | InputType<Types> { | ||
param: InputTypeParam<Types> | TypeParam<Types>, | ||
): InputType<Types> | OutputType<Types> { | ||
if (Array.isArray(param)) { | ||
@@ -151,3 +151,3 @@ return unwrapListParam(param[0]); | ||
onError?: (errVal: unknown) => R, | ||
): R | Promise<R> { | ||
): Promise<R> | R { | ||
if (isThenable(valOrPromise)) { | ||
@@ -154,0 +154,0 @@ return Promise.resolve(valOrPromise).then(onSuccess, onError); |
@@ -227,3 +227,5 @@ import type BuildCache from '../build-cache'; | ||
mapped[fieldName] = field.isList | ||
? (fieldVal as unknown[]).map((val) => mapValue(val, field, ...args)) | ||
? (fieldVal as unknown[]).map((val) => | ||
val == null ? val : mapValue(val, field, ...args), | ||
) | ||
: mapValue(fieldVal, field, ...args); | ||
@@ -230,0 +232,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1060960
95502
15843