@pothos/plugin-sub-graph
Advanced tools
Comparing version 3.12.2 to 3.12.3
# Change Log | ||
## 3.12.3 | ||
### Patch Changes | ||
- 3a82d645: Apply esm transform to esm d.ts definitions | ||
## 3.12.2 | ||
@@ -4,0 +10,0 @@ |
import { FieldNullability, FieldRequiredness, InputFieldMap, InputShapeFromTypeParam, InputType, InterfaceParam, RootName, SchemaTypes, TypeParam } from '@pothos/core'; | ||
import type { PothosSubGraphPlugin } from '.'; | ||
import type { PothosSubGraphPlugin } from './index.js'; | ||
declare global { | ||
export namespace PothosSchemaTypes { | ||
interface BaseTypeOptions<Types extends SchemaTypes = SchemaTypes> { | ||
subGraphs?: Types['SubGraphs'][]; | ||
subGraphs?: Types["SubGraphs"][]; | ||
} | ||
interface BuildSchemaOptions<Types extends SchemaTypes> { | ||
subGraph?: Types['SubGraphs'] | Types['SubGraphs'][]; | ||
subGraph?: Types["SubGraphs"] | Types["SubGraphs"][]; | ||
} | ||
interface ObjectTypeOptions<Types extends SchemaTypes = SchemaTypes, Shape = unknown> extends BaseTypeOptions<Types> { | ||
defaultSubGraphsForFields?: Types['SubGraphs'][]; | ||
defaultSubGraphsForFields?: Types["SubGraphs"][]; | ||
} | ||
interface RootTypeOptions<Types extends SchemaTypes, Type extends RootName> extends BaseTypeOptions<Types> { | ||
defaultSubGraphsForFields?: Types['SubGraphs'][]; | ||
defaultSubGraphsForFields?: Types["SubGraphs"][]; | ||
} | ||
interface InterfaceTypeOptions<Types extends SchemaTypes = SchemaTypes, Shape = unknown, Interfaces extends InterfaceParam<Types>[] = InterfaceParam<Types>[]> extends BaseTypeOptions<Types> { | ||
defaultSubGraphsForFields?: Types['SubGraphs'][]; | ||
defaultSubGraphsForFields?: Types["SubGraphs"][]; | ||
} | ||
interface FieldOptions<Types extends SchemaTypes = SchemaTypes, ParentShape = unknown, Type extends TypeParam<Types> = TypeParam<Types>, Nullable extends FieldNullability<Type> = FieldNullability<Type>, Args extends InputFieldMap = InputFieldMap, ResolveShape = unknown, ResolveReturnShape = unknown> { | ||
subGraphs?: Types['SubGraphs'][]; | ||
subGraphs?: Types["SubGraphs"][]; | ||
} | ||
interface ArgFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [InputType<Types>] = InputType<Types> | [InputType<Types>], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> extends InputFieldOptions<Types, Type, Req> { | ||
subGraphs?: undefined extends InputShapeFromTypeParam<Types, Type, Req> ? Types['SubGraphs'][] : never; | ||
interface ArgFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [ | ||
InputType<Types> | ||
] = InputType<Types> | [ | ||
InputType<Types> | ||
], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> extends InputFieldOptions<Types, Type, Req> { | ||
subGraphs?: undefined extends InputShapeFromTypeParam<Types, Type, Req> ? Types["SubGraphs"][] : never; | ||
} | ||
interface InputObjectFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [InputType<Types>] = InputType<Types> | [InputType<Types>], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> extends InputFieldOptions<Types, Type, Req> { | ||
subGraphs?: undefined extends InputShapeFromTypeParam<Types, Type, Req> ? Types['SubGraphs'][] : never; | ||
interface InputObjectFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [ | ||
InputType<Types> | ||
] = InputType<Types> | [ | ||
InputType<Types> | ||
], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> extends InputFieldOptions<Types, Type, Req> { | ||
subGraphs?: undefined extends InputShapeFromTypeParam<Types, Type, Req> ? Types["SubGraphs"][] : never; | ||
} | ||
@@ -34,4 +42,4 @@ interface Plugins<Types extends SchemaTypes> { | ||
subGraphs?: { | ||
defaultForTypes?: Types['SubGraphs'][]; | ||
defaultForFields?: Types['SubGraphs'][]; | ||
defaultForTypes?: Types["SubGraphs"][]; | ||
defaultForFields?: Types["SubGraphs"][]; | ||
fieldsInheritFromTypes?: boolean; | ||
@@ -44,6 +52,6 @@ }; | ||
interface ExtendDefaultTypes<PartialTypes extends Partial<UserSchemaTypes>> { | ||
SubGraphs: PartialTypes['SubGraphs'] & string; | ||
SubGraphs: PartialTypes["SubGraphs"] & string; | ||
} | ||
} | ||
} | ||
//# sourceMappingURL=global-types.d.ts.map | ||
//# sourceMappingURL=global-types.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import './global-types'; | ||
import './global-types.js'; | ||
import { GraphQLFieldConfigMap, GraphQLInputFieldConfigMap, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLNamedType, GraphQLObjectType, GraphQLSchema } from 'graphql'; | ||
@@ -255,2 +255,2 @@ import { BasePlugin, PothosInputFieldConfig, PothosOutputFieldConfig, PothosTypeConfig, SchemaTypes } from '@pothos/core'; | ||
} | ||
//# sourceMappingURL=index.d.ts.map | ||
//# sourceMappingURL=index.d.ts.map |
import { GraphQLNamedType, GraphQLType } from 'graphql'; | ||
export declare function replaceType<T extends GraphQLType>(type: T, newTypes: Map<string, GraphQLNamedType>, referencedBy: string, subGraphs: string[]): T; | ||
//# sourceMappingURL=util.d.ts.map | ||
//# sourceMappingURL=util.d.ts.map |
{ | ||
"name": "@pothos/plugin-sub-graph", | ||
"version": "3.12.2", | ||
"version": "3.12.3", | ||
"description": "A Pothos plugin for creating multiple variants or sub-selections of the same graph", | ||
@@ -44,7 +44,7 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"@pothos/core": "3.22.2", | ||
"@pothos/plugin-errors": "3.8.2", | ||
"@pothos/plugin-relay": "3.28.2", | ||
"@pothos/plugin-with-input": "3.9.2", | ||
"@pothos/test-utils": "1.4.1", | ||
"@pothos/core": "3.22.4", | ||
"@pothos/plugin-errors": "3.8.3", | ||
"@pothos/plugin-relay": "3.28.3", | ||
"@pothos/plugin-with-input": "3.9.3", | ||
"@pothos/test-utils": "1.4.2", | ||
"graphql": "16.6.0", | ||
@@ -62,4 +62,4 @@ "graphql-tag": "^2.12.6" | ||
"esm:extensions": "TS_NODE_PROJECT=../../tsconfig.json node -r @swc-node/register ../../scripts/esm-transformer.ts", | ||
"test": "pnpm vitest --run" | ||
"test": "pnpm vitest --run --segfault-retry=3" | ||
} | ||
} |
117026
1585