@pothos/plugin-with-input
Advanced tools
Comparing version 4.0.0-next.0 to 4.0.0-next.1
# @pothos/plugin-with-input | ||
## 4.0.0-next.1 | ||
### Patch Changes | ||
- Fix prismaFieldWithInput | ||
## 4.0.0-next.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { ArgumentRef, FieldKind, FieldNullability, FieldRef, InputFieldRef, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; | ||
import { FieldKind, FieldNullability, FieldRef, InputFieldMap, InputFieldRef, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; | ||
import { FieldWithInputOptions, WithInputArgOptions, WithInputBuilderOptions, WithInputTypeOptions } from './types'; | ||
@@ -20,5 +20,5 @@ import type { PothosWithInputPlugin } from '.'; | ||
input: InputFieldBuilder<Types, 'InputObject'>; | ||
fieldWithInput: <Fields extends Record<string, InputFieldRef<Types, unknown>>, Type extends TypeParam<Types>, ResolveShape, ResolveReturnShape, ArgRequired extends boolean, Args extends Record<string, ArgumentRef<Types, unknown>> = {}, Nullable extends FieldNullability<Type> = Types['DefaultFieldNullability'], InputName extends string = 'input'>(options: FieldWithInputOptions<Types, ParentShape, Kind, Args, Fields, Type, Nullable, InputName, ResolveShape, ResolveReturnShape, boolean extends ArgRequired ? Types['WithInputArgRequired'] & boolean : ArgRequired>) => FieldRef<Types, ShapeFromTypeParam<Types, Type, Nullable>>; | ||
fieldWithInput: <Fields extends Record<string, InputFieldRef<Types, unknown>>, Type extends TypeParam<Types>, ResolveShape, ResolveReturnShape, ArgRequired extends boolean, Args extends InputFieldMap = {}, Nullable extends FieldNullability<Type> = Types['DefaultFieldNullability'], InputName extends string = 'input'>(options: FieldWithInputOptions<Types, ParentShape, Kind, Args, Fields, Type, Nullable, InputName, ResolveShape, ResolveReturnShape, boolean extends ArgRequired ? Types['WithInputArgRequired'] & boolean : ArgRequired>) => FieldRef<Types, ShapeFromTypeParam<Types, Type, Nullable>>; | ||
} | ||
interface FieldWithInputBaseOptions<Types extends SchemaTypes, Args extends Record<string, ArgumentRef<Types, unknown>>, Fields extends Record<string, InputFieldRef<Types, unknown>>, InputName extends string, ArgRequired extends boolean> { | ||
interface FieldWithInputBaseOptions<Types extends SchemaTypes, Args extends InputFieldMap, Fields extends InputFieldMap, InputName extends string, ArgRequired extends boolean> { | ||
typeOptions?: WithInputTypeOptions<Types, Fields>; | ||
@@ -25,0 +25,0 @@ argOptions?: WithInputArgOptions<Types, Fields, InputName, ArgRequired>; |
@@ -1,2 +0,2 @@ | ||
import { ArgumentRef, FieldKind, FieldNullability, FieldOptionsFromKind, InputFieldMap, InputFieldRef, InputRef, InputShapeFromFields, SchemaTypes, TypeParam } from '@pothos/core'; | ||
import { FieldKind, FieldNullability, FieldOptionsFromKind, InputFieldMap, InputFieldRef, InputRef, InputShapeFromFields, SchemaTypes, TypeParam } from '@pothos/core'; | ||
export interface WithInputBuilderOptions<Types extends SchemaTypes> { | ||
@@ -24,3 +24,3 @@ argOptions?: Omit<PothosSchemaTypes.ArgFieldOptions<Types, InputRef<{}>, true>, 'required' | 'type'> & { | ||
}; | ||
export type FieldWithInputOptions<Types extends SchemaTypes, ParentShape, Kind extends FieldKind, Args extends Record<string, ArgumentRef<Types, unknown>>, Fields extends Record<string, InputFieldRef<Types, unknown>>, Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, InputName extends string, ResolveShape, ResolveReturnShape, ArgRequired extends boolean> = Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, Args & { | ||
export type FieldWithInputOptions<Types extends SchemaTypes, ParentShape, Kind extends FieldKind, Args extends InputFieldMap, Fields extends InputFieldMap, Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, InputName extends string, ResolveShape, ResolveReturnShape, ArgRequired extends boolean> = Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, Args & { | ||
[K in InputName]: InputFieldRef<Types, InputShapeFromFields<Fields> | (true extends ArgRequired ? never : null | undefined)>; | ||
@@ -27,0 +27,0 @@ }, Kind, ResolveShape, ResolveReturnShape>, 'args'> & { |
@@ -1,2 +0,2 @@ | ||
import { ArgumentRef, FieldKind, FieldNullability, FieldRef, InputFieldRef, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; | ||
import { FieldKind, FieldNullability, FieldRef, InputFieldMap, InputFieldRef, SchemaTypes, ShapeFromTypeParam, TypeParam } from '@pothos/core'; | ||
import { FieldWithInputOptions, WithInputArgOptions, WithInputBuilderOptions, WithInputTypeOptions } from './types.js'; | ||
@@ -20,5 +20,5 @@ import type { PothosWithInputPlugin } from './index.js'; | ||
input: InputFieldBuilder<Types, "InputObject">; | ||
fieldWithInput: <Fields extends Record<string, InputFieldRef<Types, unknown>>, Type extends TypeParam<Types>, ResolveShape, ResolveReturnShape, ArgRequired extends boolean, Args extends Record<string, ArgumentRef<Types, unknown>> = {}, Nullable extends FieldNullability<Type> = Types["DefaultFieldNullability"], InputName extends string = "input">(options: FieldWithInputOptions<Types, ParentShape, Kind, Args, Fields, Type, Nullable, InputName, ResolveShape, ResolveReturnShape, boolean extends ArgRequired ? Types["WithInputArgRequired"] & boolean : ArgRequired>) => FieldRef<Types, ShapeFromTypeParam<Types, Type, Nullable>>; | ||
fieldWithInput: <Fields extends Record<string, InputFieldRef<Types, unknown>>, Type extends TypeParam<Types>, ResolveShape, ResolveReturnShape, ArgRequired extends boolean, Args extends InputFieldMap = {}, Nullable extends FieldNullability<Type> = Types["DefaultFieldNullability"], InputName extends string = "input">(options: FieldWithInputOptions<Types, ParentShape, Kind, Args, Fields, Type, Nullable, InputName, ResolveShape, ResolveReturnShape, boolean extends ArgRequired ? Types["WithInputArgRequired"] & boolean : ArgRequired>) => FieldRef<Types, ShapeFromTypeParam<Types, Type, Nullable>>; | ||
} | ||
interface FieldWithInputBaseOptions<Types extends SchemaTypes, Args extends Record<string, ArgumentRef<Types, unknown>>, Fields extends Record<string, InputFieldRef<Types, unknown>>, InputName extends string, ArgRequired extends boolean> { | ||
interface FieldWithInputBaseOptions<Types extends SchemaTypes, Args extends InputFieldMap, Fields extends InputFieldMap, InputName extends string, ArgRequired extends boolean> { | ||
typeOptions?: WithInputTypeOptions<Types, Fields>; | ||
@@ -25,0 +25,0 @@ argOptions?: WithInputArgOptions<Types, Fields, InputName, ArgRequired>; |
@@ -1,2 +0,2 @@ | ||
import { ArgumentRef, FieldKind, FieldNullability, FieldOptionsFromKind, InputFieldMap, InputFieldRef, InputRef, InputShapeFromFields, SchemaTypes, TypeParam } from '@pothos/core'; | ||
import { FieldKind, FieldNullability, FieldOptionsFromKind, InputFieldMap, InputFieldRef, InputRef, InputShapeFromFields, SchemaTypes, TypeParam } from '@pothos/core'; | ||
export interface WithInputBuilderOptions<Types extends SchemaTypes> { | ||
@@ -24,3 +24,3 @@ argOptions?: Omit<PothosSchemaTypes.ArgFieldOptions<Types, InputRef<{}>, true>, "required" | "type"> & { | ||
}; | ||
export type FieldWithInputOptions<Types extends SchemaTypes, ParentShape, Kind extends FieldKind, Args extends Record<string, ArgumentRef<Types, unknown>>, Fields extends Record<string, InputFieldRef<Types, unknown>>, Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, InputName extends string, ResolveShape, ResolveReturnShape, ArgRequired extends boolean> = Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, Args & { | ||
export type FieldWithInputOptions<Types extends SchemaTypes, ParentShape, Kind extends FieldKind, Args extends InputFieldMap, Fields extends InputFieldMap, Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, InputName extends string, ResolveShape, ResolveReturnShape, ArgRequired extends boolean> = Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, Args & { | ||
[K in InputName]: InputFieldRef<Types, InputShapeFromFields<Fields> | (true extends ArgRequired ? never : null | undefined)>; | ||
@@ -27,0 +27,0 @@ }, Kind, ResolveShape, ResolveReturnShape>, "args"> & { |
{ | ||
"name": "@pothos/plugin-with-input", | ||
"version": "4.0.0-next.0", | ||
"version": "4.0.0-next.1", | ||
"description": "A Pothos plugin for defining fields with input objects", | ||
@@ -45,6 +45,6 @@ "main": "./lib/index.js", | ||
"prisma": "^5.16.1", | ||
"@pothos/plugin-prisma": "4.0.0-next.0", | ||
"@pothos/core": "4.0.0-next.0", | ||
"@pothos/plugin-zod": "4.0.0-next.0", | ||
"@pothos/test-utils": "2.0.0-next.0" | ||
"@pothos/plugin-prisma": "4.0.0-next.1", | ||
"@pothos/test-utils": "2.0.0-next.0", | ||
"@pothos/core": "4.0.0-next.0" | ||
}, | ||
@@ -51,0 +51,0 @@ "scripts": { |
import { | ||
ArgumentRef, | ||
FieldKind, | ||
FieldNullability, | ||
FieldRef, | ||
InputFieldMap, | ||
InputFieldRef, | ||
@@ -51,3 +51,3 @@ SchemaTypes, | ||
ArgRequired extends boolean, | ||
Args extends Record<string, ArgumentRef<Types, unknown>> = {}, | ||
Args extends InputFieldMap = {}, | ||
Nullable extends FieldNullability<Type> = Types['DefaultFieldNullability'], | ||
@@ -74,4 +74,4 @@ InputName extends string = 'input', | ||
Types extends SchemaTypes, | ||
Args extends Record<string, ArgumentRef<Types, unknown>>, | ||
Fields extends Record<string, InputFieldRef<Types, unknown>>, | ||
Args extends InputFieldMap, | ||
Fields extends InputFieldMap, | ||
InputName extends string, | ||
@@ -78,0 +78,0 @@ ArgRequired extends boolean, |
@@ -59,4 +59,4 @@ import { | ||
Kind extends FieldKind, | ||
Args extends Record<string, ArgumentRef<Types, unknown>>, | ||
Fields extends Record<string, InputFieldRef<Types, unknown>>, | ||
Args extends InputFieldMap, | ||
Fields extends InputFieldMap, | ||
Type extends TypeParam<Types>, | ||
@@ -63,0 +63,0 @@ Nullable extends FieldNullability<Type>, |
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
166152