@pothos/plugin-directives
Advanced tools
Comparing version 3.7.2 to 3.7.3
# Change Log | ||
## 3.7.3 | ||
### Patch Changes | ||
- 3a82d645: Apply esm transform to esm d.ts definitions | ||
## 3.7.2 | ||
@@ -4,0 +10,0 @@ |
import { EnumValues, FieldNullability, FieldRequiredness, InputFieldMap, InputType, InterfaceParam, ObjectParam, RootName, SchemaTypes, TypeParam } from '@pothos/core'; | ||
import { DirectiveLocation, Directives } from './types'; | ||
import type { PothosDirectivesPlugin } from '.'; | ||
import { DirectiveLocation, Directives } from './types.js'; | ||
import type { PothosDirectivesPlugin } from './index.js'; | ||
declare global { | ||
@@ -16,3 +16,3 @@ export namespace PothosSchemaTypes { | ||
interface ExtendDefaultTypes<PartialTypes extends Partial<UserSchemaTypes>> { | ||
Directives: PartialTypes['Directives'] & {}; | ||
Directives: PartialTypes["Directives"] & {}; | ||
} | ||
@@ -23,36 +23,44 @@ interface SchemaBuilderOptions<Types extends SchemaTypes> { | ||
interface EnumTypeOptions<Types extends SchemaTypes = SchemaTypes, Values extends EnumValues<Types> = EnumValues<Types>> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'ENUM'>; | ||
directives?: Directives<Types, "ENUM">; | ||
} | ||
interface ObjectTypeOptions<Types extends SchemaTypes = SchemaTypes, Shape = unknown> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'OBJECT'>; | ||
directives?: Directives<Types, "OBJECT">; | ||
} | ||
interface RootTypeOptions<Types extends SchemaTypes, Type extends RootName> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'OBJECT'>; | ||
directives?: Directives<Types, "OBJECT">; | ||
} | ||
interface InputObjectTypeOptions<Types extends SchemaTypes = SchemaTypes, Fields extends InputFieldMap = InputFieldMap> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'INPUT_OBJECT'>; | ||
directives?: Directives<Types, "INPUT_OBJECT">; | ||
} | ||
interface InterfaceTypeOptions<Types extends SchemaTypes = SchemaTypes, Shape = unknown, Interfaces extends InterfaceParam<Types>[] = InterfaceParam<Types>[]> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'INTERFACE'>; | ||
directives?: Directives<Types, "INTERFACE">; | ||
} | ||
interface UnionTypeOptions<Types extends SchemaTypes = SchemaTypes, Member extends ObjectParam<Types> = ObjectParam<Types>> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'UNION'>; | ||
directives?: Directives<Types, "UNION">; | ||
} | ||
interface ScalarTypeOptions<Types extends SchemaTypes = SchemaTypes, ScalarInputShape = unknown, ScalarOutputShape = unknown> extends BaseTypeOptions<Types> { | ||
directives?: Directives<Types, 'SCALAR'>; | ||
directives?: Directives<Types, "SCALAR">; | ||
} | ||
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> { | ||
directives?: Directives<Types, 'FIELD_DEFINITION'>; | ||
directives?: Directives<Types, "FIELD_DEFINITION">; | ||
} | ||
interface InputObjectFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [InputType<Types>] = InputType<Types> | [InputType<Types>], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> { | ||
directives?: Directives<Types, 'INPUT_FIELD_DEFINITION'>; | ||
interface InputObjectFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [ | ||
InputType<Types> | ||
] = InputType<Types> | [ | ||
InputType<Types> | ||
], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> { | ||
directives?: Directives<Types, "INPUT_FIELD_DEFINITION">; | ||
} | ||
interface ArgFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [InputType<Types>] = InputType<Types> | [InputType<Types>], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> { | ||
directives?: Directives<Types, 'ARGUMENT_DEFINITION'>; | ||
interface ArgFieldOptions<Types extends SchemaTypes = SchemaTypes, Type extends InputType<Types> | [ | ||
InputType<Types> | ||
] = InputType<Types> | [ | ||
InputType<Types> | ||
], Req extends FieldRequiredness<Type> = FieldRequiredness<Type>> { | ||
directives?: Directives<Types, "ARGUMENT_DEFINITION">; | ||
} | ||
interface EnumValueConfig<Types extends SchemaTypes = SchemaTypes> { | ||
directives?: Directives<Types, 'ENUM_VALUE'>; | ||
directives?: Directives<Types, "ENUM_VALUE">; | ||
} | ||
} | ||
} | ||
//# sourceMappingURL=global-types.d.ts.map | ||
//# sourceMappingURL=global-types.d.ts.map |
@@ -1,6 +0,6 @@ | ||
import './global-types'; | ||
import './global-types.js'; | ||
import { GraphQLSchema } from 'graphql'; | ||
import { BasePlugin, PothosEnumValueConfig, PothosInputFieldConfig, PothosOutputFieldConfig, PothosTypeConfig, SchemaTypes } from '@pothos/core'; | ||
import { DirectiveList } from './types'; | ||
export * from './types'; | ||
import { DirectiveList } from './types.js'; | ||
export * from './types.js'; | ||
declare const pluginName: "directives"; | ||
@@ -17,2 +17,2 @@ export default pluginName; | ||
} | ||
//# sourceMappingURL=index.d.ts.map | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import './global-types'; | ||
import './global-types.js'; | ||
import { GraphQLSchema } from 'graphql'; | ||
export default function mockAst(schema: GraphQLSchema): void; | ||
//# sourceMappingURL=mock-ast.d.ts.map | ||
//# sourceMappingURL=mock-ast.d.ts.map |
import { SchemaTypes } from '@pothos/core'; | ||
export declare type DirectiveLocation = 'ARGUMENT_DEFINITION' | 'ENUM_VALUE' | 'ENUM' | 'FIELD_DEFINITION' | 'INPUT_FIELD_DEFINITION' | 'INPUT_OBJECT' | 'INTERFACE' | 'OBJECT' | 'SCALAR' | 'SCHEMA' | 'UNION'; | ||
export declare type DirectiveLocation = "ARGUMENT_DEFINITION" | "ENUM_VALUE" | "ENUM" | "FIELD_DEFINITION" | "INPUT_FIELD_DEFINITION" | "INPUT_OBJECT" | "INTERFACE" | "OBJECT" | "SCALAR" | "SCHEMA" | "UNION"; | ||
export declare type DirectiveList = { | ||
@@ -8,12 +8,12 @@ name: string; | ||
export declare type DirectivesFor<Types extends SchemaTypes, Location extends DirectiveLocation> = { | ||
[K in keyof Types['Directives']]: Location extends Types['Directives'][K]['locations'] ? K : never; | ||
}[keyof Types['Directives']]; | ||
[K in keyof Types["Directives"]]: Location extends Types["Directives"][K]["locations"] ? K : never; | ||
}[keyof Types["Directives"]]; | ||
export declare type Directives<Types extends SchemaTypes, Location extends DirectiveLocation> = { | ||
[K in keyof Types['Directives']]: Types['Directives'][K]['locations'] extends Location ? { | ||
[K in keyof Types["Directives"]]: Types["Directives"][K]["locations"] extends Location ? { | ||
name: K; | ||
args: Types['Directives'][K]['args']; | ||
args: Types["Directives"][K]["args"]; | ||
} : never; | ||
}[keyof Types['Directives']][] | { | ||
[K in DirectivesFor<Types, Location>]?: Types['Directives'][K]['args'] & {}; | ||
}[keyof Types["Directives"]][] | { | ||
[K in DirectivesFor<Types, Location>]?: Types["Directives"][K]["args"] & {}; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@pothos/plugin-directives", | ||
"version": "3.7.2", | ||
"version": "3.7.3", | ||
"description": "Directive plugin for Pothos, enables using graphql-tools based directives with Pothos", | ||
@@ -41,4 +41,4 @@ "main": "./lib/index.js", | ||
"@graphql-tools/utils": "^8.12.0", | ||
"@pothos/core": "3.22.2", | ||
"@pothos/test-utils": "1.4.1", | ||
"@pothos/core": "3.22.4", | ||
"@pothos/test-utils": "1.4.2", | ||
"graphql": "16.6.0", | ||
@@ -45,0 +45,0 @@ "graphql-rate-limit-directive": "^2.0.2", |
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
116131
1505