@pothos/core
Advanced tools
Comparing version 3.33.1 to 3.34.0
# Change Log | ||
## 3.34.0 | ||
### Minor Changes | ||
- f0247390: Add isOneOf option for input type. this adds @oneOf directive, but does not currently | ||
affect the typescript type for the input | ||
## 3.33.1 | ||
@@ -4,0 +11,0 @@ |
@@ -47,3 +47,3 @@ import type { GraphQLResolveInfo } from 'graphql'; | ||
export type ArgBuilder<Types extends SchemaTypes> = PothosSchemaTypes.InputFieldBuilder<Types, 'Arg'>['field'] & Omit<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 extends interface shape' : never; | ||
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; | ||
export type InputShapeFromFields<Fields extends InputFieldMap> = NormalizeNullableFields<{ | ||
@@ -50,0 +50,0 @@ [K in string & keyof Fields]: InputShapeFromField<Fields[K]>; |
@@ -35,2 +35,3 @@ import type { GraphQLIsTypeOfFn, GraphQLResolveInfo, GraphQLScalarLiteralParser, GraphQLScalarValueParser, GraphQLUnionType } from 'graphql'; | ||
interface InputObjectTypeOptions<Types extends SchemaTypes = SchemaTypes, Fields extends InputFieldMap = InputFieldMap> extends BaseTypeOptions<Types> { | ||
isOneOf?: boolean; | ||
fields: (t: InputFieldBuilder<Types, 'InputObject'>) => Fields; | ||
@@ -37,0 +38,0 @@ } |
@@ -299,2 +299,3 @@ function _define_property(obj, key, value) { | ||
name, | ||
isOneOf: options.isOneOf, | ||
description: options.description, | ||
@@ -301,0 +302,0 @@ pothosOptions: options, |
@@ -51,3 +51,3 @@ import type { GraphQLResolveInfo } from 'graphql'; | ||
export type ArgBuilder<Types extends SchemaTypes> = PothosSchemaTypes.InputFieldBuilder<Types, "Arg">["field"] & Omit<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 extends interface shape" : never; | ||
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; | ||
export type InputShapeFromFields<Fields extends InputFieldMap> = NormalizeNullableFields<{ | ||
@@ -54,0 +54,0 @@ [K in string & keyof Fields]: InputShapeFromField<Fields[K]>; |
@@ -35,2 +35,3 @@ import type { GraphQLIsTypeOfFn, GraphQLResolveInfo, GraphQLScalarLiteralParser, GraphQLScalarValueParser, GraphQLUnionType } from 'graphql'; | ||
interface InputObjectTypeOptions<Types extends SchemaTypes = SchemaTypes, Fields extends InputFieldMap = InputFieldMap> extends BaseTypeOptions<Types> { | ||
isOneOf?: boolean; | ||
fields: (t: InputFieldBuilder<Types, "InputObject">) => Fields; | ||
@@ -37,0 +38,0 @@ } |
@@ -352,2 +352,3 @@ "use strict"; | ||
name, | ||
isOneOf: options.isOneOf, | ||
description: options.description, | ||
@@ -354,0 +355,0 @@ pothosOptions: options, |
{ | ||
"name": "@pothos/core", | ||
"version": "3.33.1", | ||
"version": "3.34.0", | ||
"description": "Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript", | ||
@@ -43,3 +43,3 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"graphql": "16.7.1", | ||
"graphql": "16.8.0", | ||
"graphql-scalars": "^1.22.2", | ||
@@ -46,0 +46,0 @@ "graphql-tag": "^2.12.6", |
@@ -557,6 +557,7 @@ import { | ||
const config: PothosInputObjectTypeConfig = { | ||
const config: PothosInputObjectTypeConfig & { isOneOf?: boolean } = { | ||
kind: 'InputObject', | ||
graphqlKind: 'InputObject', | ||
name, | ||
isOneOf: options.isOneOf, | ||
description: options.description, | ||
@@ -563,0 +564,0 @@ pothosOptions: options as unknown as PothosSchemaTypes.InputObjectTypeOptions, |
@@ -203,3 +203,3 @@ import type { GraphQLResolveInfo } from 'graphql'; | ||
? Interfaces | ||
: 'Object shape must extends interface shape' | ||
: 'Object shape must extend interface shape' | ||
: never; | ||
@@ -206,0 +206,0 @@ |
@@ -74,2 +74,3 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
> extends BaseTypeOptions<Types> { | ||
isOneOf?: boolean; | ||
fields: (t: InputFieldBuilder<Types, 'InputObject'>) => Fields; | ||
@@ -76,0 +77,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
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
1050843
15715
78962