@soda-gql/core 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-Bj60NxMb.d.cts.map +1 -1
- package/dist/{index-BcA2XPEk.d.ts → index-DPtgl2f4.d.ts} +58 -6
- package/dist/index-DPtgl2f4.d.ts.map +1 -0
- package/dist/{index-CatAewXz.d.cts → index-IMOOkvQf.d.cts} +58 -6
- package/dist/index-IMOOkvQf.d.cts.map +1 -0
- package/dist/index.cjs +32 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -6
- package/dist/index.js.map +1 -1
- package/dist/runtime.d.cts +1 -1
- package/dist/runtime.d.cts.map +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-BcA2XPEk.d.ts.map +0 -1
- package/dist/index-CatAewXz.d.cts.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as InputInferrableTypeSpecifier, A as InputDefinition, At as ConstValue, B as UnionMemberName, C as AnyFieldName, Ct as DecrementDepth, D as InferInputKind, Dt as InputDepthOverrides, E as EnumDefinition, Et as GetInputTypeDepth, F as OperationType, Ft as getCurrentFieldPath, G as NestedValueElement, H as AnyVarRef, I as PickTypeSpecifierByFieldName, It as isListType, J as createVarRefFromNestedValue, K as VarRef, L as ResolveInputProfileFromMeta, Lt as withFieldPath, M as ObjectDefinition, Mt as FieldPath, N as ObjectFieldRecord, Nt as FieldPathSegment, O as InferInputProfile, Ot as IsDepthExhausted, P as OperationRoots, Pt as appendToPath, Q as InputEnumSpecifier, R as ScalarDefinition, S as AllInputTypeNames, St as ValidTypeModifier, T as AnyTypeName, Tt as DepthCounter, U as AnyVarRefBrand, V as UnionTypeRecord, W as NestedValue, X as AnyDefaultValue, Y as createVarRefFromVariable, Z as AnyTypeSpecifier, _ as FragmentMetadataBuilder, _t as PrimitiveTypeProfile, a as DefaultMetadataAdapter, at as OutputEnumSpecifier, b as MetadataBuilderTools, bt as GetSignature, c as ExtractAdapterTypes, ct as OutputScalarSpecifier, d as MetadataAdapter, dt as OutputTypeSpecifiers, et as InputInputObjectSpecifier, f as OperationDocumentTransformArgs, ft as OutputTypenameSpecifier, g as ExtractMetadata, gt as ObjectTypeProfile, h as defaultMetadataAdapter, ht as GetModifiedType, i as DefaultAdapter, it as InputTypeSpecifiers, j as InputFieldRecord, jt as ConstValues, k as InferOutputProfile, kt as NumberToDepth, l as ExtractUnifiedAdapterTypes, lt as OutputTypeKind, m as createDefaultAdapter, mt as GetConstAssignableType, n as AnyAdapter, nt as InputTypeKind, o as DocumentTransformArgs, ot as OutputInferrableTypeSpecifier, p as OperationDocumentTransformer, pt as OutputUnionSpecifier, q as VarRefInner, r as AnyMetadataAdapter, rt as InputTypeSpecifier, s as DocumentTransformer, st as OutputObjectSpecifier, t as Adapter, tt as InputScalarSpecifier, u as FragmentMetaInfo, ut as OutputTypeSpecifier, v as FragmentMetadataBuilderTools, vt as TypeProfile, w as AnyGraphqlSchema, wt as DefaultDepth, x as OperationMetadata, xt as TypeModifier, y as MetadataBuilder, yt as ApplyTypeModifier, z as UnionDefinition } from "./index-Bj60NxMb.cjs";
|
|
2
|
-
import { $ as AnyOperation, $t as
|
|
2
|
+
import { $ as AnyOperation, $t as buildConstValueNode, A as GqlElementComposer, An as DirectiveRefInner, At as AttachmentToProperty, B as VarBuilderMethods, Bt as createStandardDirectives, C as getScalarInputType, Cn as ConstAssignableInputValue, Ct as NestedUnionFieldsBuilder, D as AnyGqlContext, Dn as DirectiveArgumentSpecifier, Dt as SwitchIfOmittable, E as createOperationComposerFactory, En as AnyDirectiveRefBrand, Et as OptionalArg, F as InputTypeMethods, Ft as DirectiveBuilder, G as FragmentUsageRecord, Gt as ColocatedFields, H as createVarBuilder, Ht as isDirectiveRef, I as ResolveTypeFromMeta, It as DirectiveMethod, J as FragmentBuilderFor, Jt as StripSymbols, K as recordFragmentUsage, Kt as createColocateHelper, L as SchemaAwareGetNameAt, Lt as StandardDirectives, M as GqlElementComposerWithSchema, Mn as TypeSystemDirectiveLocation, Mt as AnyDirectiveMethod, N as createGqlElementComposer, Nt as DirectiveArgValue, O as ExtractMetadataAdapter, On as DirectiveLocation, Ot as empty, P as InputTypeMethod, Pt as DirectiveArgumentSpecifiers, Q as createFieldFactories, Qt as buildArgumentValue, R as SchemaAwareGetValueAt, Rt as createDirectiveBuilder, S as getEnumType, Sn as ConstAssignableInput, St as NestedObjectFieldsBuilderTools, T as graphqlTypeToTypeScript, Tn as AnyDirectiveRef, Tt as IfOmittable, U as createVarMethod, Ut as ColocateHelper, V as VarSpecifier, Vt as createTypedDirectiveMethod, W as createVarMethodFactory, Wt as ColocatedEntries, X as createVarAssignments, Xt as UnionToIntersection, Y as createGqlFragmentComposers, Yt as Tuple, Z as createVarRefs, Zt as EnumLookup, _ as calculateFieldType, _n as DeclaredVariables, _t as FieldSelectionFactoryReturn, a as HasPrebuiltFragment, an as AnyFields, at as FragmentInferMeta, b as generateInputType, bn as AnyConstAssignableInput, bt as FieldsBuilderTools, c as PrebuiltFragmentInput, cn as FieldSelectionTemplateOf, ct as GqlElementContext, d as PrebuiltOperationOutput, dn as AnyDirectiveAttachments, dt as AnyFieldSelectionFactoryReturn, en as buildDocument, et as AnyOperationOf, f as PrebuiltTypeRegistry, fn as AnyAssignableInput, ft as FieldSelectionFactories, g as applyTypeModifier, gn as AssignableInputByFieldName, gt as FieldSelectionFactoryPrimitiveReturn, h as TypeFormatters, hn as AssignableInput, ht as FieldSelectionFactoryObjectReturn, i as EmptyPrebuiltTypeRegistry, in as AnyFieldSelection, it as Fragment, j as GqlElementComposerOptions, jn as ExecutableDirectiveLocation, jt as AttachmentsTupleToIntersection, k as FragmentBuildersAll, kn as DirectiveRef, kt as AttachmentShape, l as PrebuiltFragmentOutput, ln as InferField, lt as GqlElementDefinitionFactory, m as GenerateInputObjectTypeOptions, mn as AnyAssigningInput, mt as FieldSelectionFactoryFieldArguments, n as Hidden, nn as buildWithTypeModifier, nt as OperationInferMeta, o as HasPrebuiltOperation, on as AnyNestedObject, ot as GqlElement, p as PrebuiltUnknownElement, pn as AnyAssignableInputValue, pt as FieldSelectionFactory, q as withFragmentUsageCollection, qt as StripFunctions, r as hidden, rn as AbstractFieldSelection, rt as AnyFragment, s as PrebuiltEntryNotFound, sn as AnyNestedUnion, st as GqlElementAttachment, t as wrapByKey, tn as buildOperationTypeNode, tt as Operation, u as PrebuiltOperationInput, un as InferFields, ut as AnyFieldSelectionFactory, v as calculateFieldsType, vn as FieldArgumentValue, vt as FieldSelectionFactoryUnionReturn, w as getScalarOutputType, wn as GetAssignableType, wt as EmptyObject, x as generateInputTypeFromSpecifiers, xn as AnyConstAssignableInputValue, xt as NestedObjectFieldsBuilder, y as generateInputObjectType, yn as AnyConstDirectiveAttachments, yt as FieldsBuilder, z as VarBuilder, zt as createDirectiveMethod } from "./index-IMOOkvQf.cjs";
|
|
3
3
|
import { n as defineOperationRoots, r as defineScalar, t as defineEnum } from "./schema-builder-YC3vPw7X.cjs";
|
|
4
4
|
|
|
5
5
|
//#region packages/core/src/types/type-foundation/modified-type-name.d.ts
|
|
@@ -11,5 +11,5 @@ declare function parseModifiedTypeName<TNameCandidate extends [string], TName ex
|
|
|
11
11
|
modifier: TModifier;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { AbstractFieldSelection, Adapter, AllInputTypeNames, AnyAdapter, AnyAssignableInput, AnyAssignableInputValue, AnyAssigningInput, AnyConstAssignableInput, AnyConstAssignableInputValue, AnyConstDirectiveAttachments, AnyDefaultValue, AnyDirectiveAttachments, AnyDirectiveMethod, AnyDirectiveRef, AnyDirectiveRefBrand, AnyFieldName, AnyFieldSelection, AnyFieldSelectionFactory, AnyFieldSelectionFactoryReturn, AnyFields, AnyFragment, AnyGqlContext, AnyGraphqlSchema, AnyMetadataAdapter, AnyNestedObject, AnyNestedUnion, AnyOperation, AnyOperationOf, AnyTypeName, AnyTypeSpecifier, AnyVarRef, AnyVarRefBrand, ApplyTypeModifier, AssignableInput, AssignableInputByFieldName, AttachmentShape, AttachmentToProperty, AttachmentsTupleToIntersection, ColocateHelper, ColocatedEntries, ColocatedFields, ConstAssignableInput, ConstAssignableInputValue, ConstValue, ConstValues, DeclaredVariables, DecrementDepth, DefaultAdapter, DefaultDepth, DefaultMetadataAdapter, DepthCounter, DirectiveArgValue, DirectiveBuilder, DirectiveLocation, DirectiveMethod, DirectiveRef, DirectiveRefInner, DocumentTransformArgs, DocumentTransformer, EmptyObject, EmptyPrebuiltTypeRegistry, EnumDefinition, EnumLookup, ExtractAdapterTypes, ExtractMetadata, ExtractMetadataAdapter, ExtractUnifiedAdapterTypes, FieldArgumentValue, FieldPath, FieldPathSegment, FieldSelectionFactories, FieldSelectionFactory, FieldSelectionFactoryFieldArguments, FieldSelectionFactoryObjectReturn, FieldSelectionFactoryPrimitiveReturn, FieldSelectionFactoryReturn, FieldSelectionFactoryUnionReturn, FieldSelectionTemplateOf, FieldsBuilder, FieldsBuilderTools, Fragment, FragmentBuilderFor, FragmentBuildersAll, FragmentInferMeta, FragmentMetaInfo, FragmentMetadataBuilder, FragmentMetadataBuilderTools, FragmentUsageRecord, GenerateInputObjectTypeOptions, GetAssignableType, GetConstAssignableType, GetInputTypeDepth, GetModifiedType, GetSignature, GqlElement, GqlElementAttachment, GqlElementComposer, GqlElementComposerOptions, GqlElementComposerWithSchema, GqlElementContext, GqlElementDefinitionFactory, HasPrebuiltFragment, HasPrebuiltOperation, Hidden, IfOmittable, InferField, InferFields, InferInputKind, InferInputProfile, InferOutputProfile, InputDefinition, InputDepthOverrides, InputEnumSpecifier, InputFieldRecord, InputInferrableTypeSpecifier, InputInputObjectSpecifier, InputScalarSpecifier, InputTypeKind, InputTypeMethod, InputTypeMethods, InputTypeSpecifier, InputTypeSpecifiers, IsDepthExhausted, MetadataAdapter, MetadataBuilder, MetadataBuilderTools, ModifiedTypeName, NestedObjectFieldsBuilder, NestedObjectFieldsBuilderTools, NestedUnionFieldsBuilder, NestedValue, NestedValueElement, NumberToDepth, ObjectDefinition, ObjectFieldRecord, ObjectTypeProfile, Operation, OperationDocumentTransformArgs, OperationDocumentTransformer, OperationInferMeta, OperationMetadata, OperationRoots, OperationType, OptionalArg, OutputEnumSpecifier, OutputInferrableTypeSpecifier, OutputObjectSpecifier, OutputScalarSpecifier, OutputTypeKind, OutputTypeSpecifier, OutputTypeSpecifiers, OutputTypenameSpecifier, OutputUnionSpecifier, PickTypeSpecifierByFieldName, PrebuiltEntryNotFound, PrebuiltFragmentInput, PrebuiltFragmentOutput, PrebuiltOperationInput, PrebuiltOperationOutput, PrebuiltTypeRegistry, PrebuiltUnknownElement, PrimitiveTypeProfile, ResolveInputProfileFromMeta, ResolveTypeFromMeta, ScalarDefinition, SchemaAwareGetNameAt, SchemaAwareGetValueAt, StandardDirectives, StripFunctions, StripSymbols, SwitchIfOmittable, Tuple, TypeFormatters, TypeModifier, TypeProfile, UnionDefinition, UnionMemberName, UnionToIntersection, UnionTypeRecord, ValidTypeModifier, VarBuilder, VarBuilderMethods, VarRef, VarRefInner, VarSpecifier, appendToPath, applyTypeModifier, buildArgumentValue, buildConstValueNode, buildDocument, buildOperationTypeNode, buildWithTypeModifier, calculateFieldType, calculateFieldsType, createColocateHelper, createDefaultAdapter, createDirectiveBuilder, createDirectiveMethod, createFieldFactories, createGqlElementComposer, createGqlFragmentComposers, createOperationComposerFactory, createStandardDirectives, createVarAssignments, createVarBuilder, createVarMethod, createVarMethodFactory, createVarRefFromNestedValue, createVarRefFromVariable, createVarRefs, defaultMetadataAdapter, defineEnum, defineOperationRoots, defineScalar, empty, generateInputObjectType, generateInputType, generateInputTypeFromSpecifiers, getCurrentFieldPath, getEnumType, getScalarInputType, getScalarOutputType, graphqlTypeToTypeScript, hidden, isDirectiveRef, isListType, parseModifiedTypeName, recordFragmentUsage, withFieldPath, withFragmentUsageCollection, wrapByKey };
|
|
14
|
+
export { AbstractFieldSelection, Adapter, AllInputTypeNames, AnyAdapter, AnyAssignableInput, AnyAssignableInputValue, AnyAssigningInput, AnyConstAssignableInput, AnyConstAssignableInputValue, AnyConstDirectiveAttachments, AnyDefaultValue, AnyDirectiveAttachments, AnyDirectiveMethod, AnyDirectiveRef, AnyDirectiveRefBrand, AnyFieldName, AnyFieldSelection, AnyFieldSelectionFactory, AnyFieldSelectionFactoryReturn, AnyFields, AnyFragment, AnyGqlContext, AnyGraphqlSchema, AnyMetadataAdapter, AnyNestedObject, AnyNestedUnion, AnyOperation, AnyOperationOf, AnyTypeName, AnyTypeSpecifier, AnyVarRef, AnyVarRefBrand, ApplyTypeModifier, AssignableInput, AssignableInputByFieldName, AttachmentShape, AttachmentToProperty, AttachmentsTupleToIntersection, ColocateHelper, ColocatedEntries, ColocatedFields, ConstAssignableInput, ConstAssignableInputValue, ConstValue, ConstValues, DeclaredVariables, DecrementDepth, DefaultAdapter, DefaultDepth, DefaultMetadataAdapter, DepthCounter, DirectiveArgValue, DirectiveArgumentSpecifier, DirectiveArgumentSpecifiers, DirectiveBuilder, DirectiveLocation, DirectiveMethod, DirectiveRef, DirectiveRefInner, DocumentTransformArgs, DocumentTransformer, EmptyObject, EmptyPrebuiltTypeRegistry, EnumDefinition, EnumLookup, ExecutableDirectiveLocation, ExtractAdapterTypes, ExtractMetadata, ExtractMetadataAdapter, ExtractUnifiedAdapterTypes, FieldArgumentValue, FieldPath, FieldPathSegment, FieldSelectionFactories, FieldSelectionFactory, FieldSelectionFactoryFieldArguments, FieldSelectionFactoryObjectReturn, FieldSelectionFactoryPrimitiveReturn, FieldSelectionFactoryReturn, FieldSelectionFactoryUnionReturn, FieldSelectionTemplateOf, FieldsBuilder, FieldsBuilderTools, Fragment, FragmentBuilderFor, FragmentBuildersAll, FragmentInferMeta, FragmentMetaInfo, FragmentMetadataBuilder, FragmentMetadataBuilderTools, FragmentUsageRecord, GenerateInputObjectTypeOptions, GetAssignableType, GetConstAssignableType, GetInputTypeDepth, GetModifiedType, GetSignature, GqlElement, GqlElementAttachment, GqlElementComposer, GqlElementComposerOptions, GqlElementComposerWithSchema, GqlElementContext, GqlElementDefinitionFactory, HasPrebuiltFragment, HasPrebuiltOperation, Hidden, IfOmittable, InferField, InferFields, InferInputKind, InferInputProfile, InferOutputProfile, InputDefinition, InputDepthOverrides, InputEnumSpecifier, InputFieldRecord, InputInferrableTypeSpecifier, InputInputObjectSpecifier, InputScalarSpecifier, InputTypeKind, InputTypeMethod, InputTypeMethods, InputTypeSpecifier, InputTypeSpecifiers, IsDepthExhausted, MetadataAdapter, MetadataBuilder, MetadataBuilderTools, ModifiedTypeName, NestedObjectFieldsBuilder, NestedObjectFieldsBuilderTools, NestedUnionFieldsBuilder, NestedValue, NestedValueElement, NumberToDepth, ObjectDefinition, ObjectFieldRecord, ObjectTypeProfile, Operation, OperationDocumentTransformArgs, OperationDocumentTransformer, OperationInferMeta, OperationMetadata, OperationRoots, OperationType, OptionalArg, OutputEnumSpecifier, OutputInferrableTypeSpecifier, OutputObjectSpecifier, OutputScalarSpecifier, OutputTypeKind, OutputTypeSpecifier, OutputTypeSpecifiers, OutputTypenameSpecifier, OutputUnionSpecifier, PickTypeSpecifierByFieldName, PrebuiltEntryNotFound, PrebuiltFragmentInput, PrebuiltFragmentOutput, PrebuiltOperationInput, PrebuiltOperationOutput, PrebuiltTypeRegistry, PrebuiltUnknownElement, PrimitiveTypeProfile, ResolveInputProfileFromMeta, ResolveTypeFromMeta, ScalarDefinition, SchemaAwareGetNameAt, SchemaAwareGetValueAt, StandardDirectives, StripFunctions, StripSymbols, SwitchIfOmittable, Tuple, TypeFormatters, TypeModifier, TypeProfile, TypeSystemDirectiveLocation, UnionDefinition, UnionMemberName, UnionToIntersection, UnionTypeRecord, ValidTypeModifier, VarBuilder, VarBuilderMethods, VarRef, VarRefInner, VarSpecifier, appendToPath, applyTypeModifier, buildArgumentValue, buildConstValueNode, buildDocument, buildOperationTypeNode, buildWithTypeModifier, calculateFieldType, calculateFieldsType, createColocateHelper, createDefaultAdapter, createDirectiveBuilder, createDirectiveMethod, createFieldFactories, createGqlElementComposer, createGqlFragmentComposers, createOperationComposerFactory, createStandardDirectives, createTypedDirectiveMethod, createVarAssignments, createVarBuilder, createVarMethod, createVarMethodFactory, createVarRefFromNestedValue, createVarRefFromVariable, createVarRefs, defaultMetadataAdapter, defineEnum, defineOperationRoots, defineScalar, empty, generateInputObjectType, generateInputType, generateInputTypeFromSpecifiers, getCurrentFieldPath, getEnumType, getScalarInputType, getScalarOutputType, graphqlTypeToTypeScript, hidden, isDirectiveRef, isListType, parseModifiedTypeName, recordFragmentUsage, withFieldPath, withFragmentUsageCollection, wrapByKey };
|
|
15
15
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as InputInferrableTypeSpecifier, A as InputDefinition, At as ConstValue, B as UnionMemberName, C as AnyFieldName, Ct as DecrementDepth, D as InferInputKind, Dt as InputDepthOverrides, E as EnumDefinition, Et as GetInputTypeDepth, F as OperationType, Ft as getCurrentFieldPath, G as NestedValueElement, H as AnyVarRef, I as PickTypeSpecifierByFieldName, It as isListType, J as createVarRefFromNestedValue, K as VarRef, L as ResolveInputProfileFromMeta, Lt as withFieldPath, M as ObjectDefinition, Mt as FieldPath, N as ObjectFieldRecord, Nt as FieldPathSegment, O as InferInputProfile, Ot as IsDepthExhausted, P as OperationRoots, Pt as appendToPath, Q as InputEnumSpecifier, R as ScalarDefinition, S as AllInputTypeNames, St as ValidTypeModifier, T as AnyTypeName, Tt as DepthCounter, U as AnyVarRefBrand, V as UnionTypeRecord, W as NestedValue, X as AnyDefaultValue, Y as createVarRefFromVariable, Z as AnyTypeSpecifier, _ as FragmentMetadataBuilder, _t as PrimitiveTypeProfile, a as DefaultMetadataAdapter, at as OutputEnumSpecifier, b as MetadataBuilderTools, bt as GetSignature, c as ExtractAdapterTypes, ct as OutputScalarSpecifier, d as MetadataAdapter, dt as OutputTypeSpecifiers, et as InputInputObjectSpecifier, f as OperationDocumentTransformArgs, ft as OutputTypenameSpecifier, g as ExtractMetadata, gt as ObjectTypeProfile, h as defaultMetadataAdapter, ht as GetModifiedType, i as DefaultAdapter, it as InputTypeSpecifiers, j as InputFieldRecord, jt as ConstValues, k as InferOutputProfile, kt as NumberToDepth, l as ExtractUnifiedAdapterTypes, lt as OutputTypeKind, m as createDefaultAdapter, mt as GetConstAssignableType, n as AnyAdapter, nt as InputTypeKind, o as DocumentTransformArgs, ot as OutputInferrableTypeSpecifier, p as OperationDocumentTransformer, pt as OutputUnionSpecifier, q as VarRefInner, r as AnyMetadataAdapter, rt as InputTypeSpecifier, s as DocumentTransformer, st as OutputObjectSpecifier, t as Adapter, tt as InputScalarSpecifier, u as FragmentMetaInfo, ut as OutputTypeSpecifier, v as FragmentMetadataBuilderTools, vt as TypeProfile, w as AnyGraphqlSchema, wt as DefaultDepth, x as OperationMetadata, xt as TypeModifier, y as MetadataBuilder, yt as ApplyTypeModifier, z as UnionDefinition } from "./index-DbANHktR.js";
|
|
2
|
-
import { $ as AnyOperation, $t as
|
|
2
|
+
import { $ as AnyOperation, $t as buildConstValueNode, A as GqlElementComposer, An as DirectiveRefInner, At as AttachmentToProperty, B as VarBuilderMethods, Bt as createStandardDirectives, C as getScalarInputType, Cn as ConstAssignableInputValue, Ct as NestedUnionFieldsBuilder, D as AnyGqlContext, Dn as DirectiveArgumentSpecifier, Dt as SwitchIfOmittable, E as createOperationComposerFactory, En as AnyDirectiveRefBrand, Et as OptionalArg, F as InputTypeMethods, Ft as DirectiveBuilder, G as FragmentUsageRecord, Gt as ColocatedFields, H as createVarBuilder, Ht as isDirectiveRef, I as ResolveTypeFromMeta, It as DirectiveMethod, J as FragmentBuilderFor, Jt as StripSymbols, K as recordFragmentUsage, Kt as createColocateHelper, L as SchemaAwareGetNameAt, Lt as StandardDirectives, M as GqlElementComposerWithSchema, Mn as TypeSystemDirectiveLocation, Mt as AnyDirectiveMethod, N as createGqlElementComposer, Nt as DirectiveArgValue, O as ExtractMetadataAdapter, On as DirectiveLocation, Ot as empty, P as InputTypeMethod, Pt as DirectiveArgumentSpecifiers, Q as createFieldFactories, Qt as buildArgumentValue, R as SchemaAwareGetValueAt, Rt as createDirectiveBuilder, S as getEnumType, Sn as ConstAssignableInput, St as NestedObjectFieldsBuilderTools, T as graphqlTypeToTypeScript, Tn as AnyDirectiveRef, Tt as IfOmittable, U as createVarMethod, Ut as ColocateHelper, V as VarSpecifier, Vt as createTypedDirectiveMethod, W as createVarMethodFactory, Wt as ColocatedEntries, X as createVarAssignments, Xt as UnionToIntersection, Y as createGqlFragmentComposers, Yt as Tuple, Z as createVarRefs, Zt as EnumLookup, _ as calculateFieldType, _n as DeclaredVariables, _t as FieldSelectionFactoryReturn, a as HasPrebuiltFragment, an as AnyFields, at as FragmentInferMeta, b as generateInputType, bn as AnyConstAssignableInput, bt as FieldsBuilderTools, c as PrebuiltFragmentInput, cn as FieldSelectionTemplateOf, ct as GqlElementContext, d as PrebuiltOperationOutput, dn as AnyDirectiveAttachments, dt as AnyFieldSelectionFactoryReturn, en as buildDocument, et as AnyOperationOf, f as PrebuiltTypeRegistry, fn as AnyAssignableInput, ft as FieldSelectionFactories, g as applyTypeModifier, gn as AssignableInputByFieldName, gt as FieldSelectionFactoryPrimitiveReturn, h as TypeFormatters, hn as AssignableInput, ht as FieldSelectionFactoryObjectReturn, i as EmptyPrebuiltTypeRegistry, in as AnyFieldSelection, it as Fragment, j as GqlElementComposerOptions, jn as ExecutableDirectiveLocation, jt as AttachmentsTupleToIntersection, k as FragmentBuildersAll, kn as DirectiveRef, kt as AttachmentShape, l as PrebuiltFragmentOutput, ln as InferField, lt as GqlElementDefinitionFactory, m as GenerateInputObjectTypeOptions, mn as AnyAssigningInput, mt as FieldSelectionFactoryFieldArguments, n as Hidden, nn as buildWithTypeModifier, nt as OperationInferMeta, o as HasPrebuiltOperation, on as AnyNestedObject, ot as GqlElement, p as PrebuiltUnknownElement, pn as AnyAssignableInputValue, pt as FieldSelectionFactory, q as withFragmentUsageCollection, qt as StripFunctions, r as hidden, rn as AbstractFieldSelection, rt as AnyFragment, s as PrebuiltEntryNotFound, sn as AnyNestedUnion, st as GqlElementAttachment, t as wrapByKey, tn as buildOperationTypeNode, tt as Operation, u as PrebuiltOperationInput, un as InferFields, ut as AnyFieldSelectionFactory, v as calculateFieldsType, vn as FieldArgumentValue, vt as FieldSelectionFactoryUnionReturn, w as getScalarOutputType, wn as GetAssignableType, wt as EmptyObject, x as generateInputTypeFromSpecifiers, xn as AnyConstAssignableInputValue, xt as NestedObjectFieldsBuilder, y as generateInputObjectType, yn as AnyConstDirectiveAttachments, yt as FieldsBuilder, z as VarBuilder, zt as createDirectiveMethod } from "./index-DPtgl2f4.js";
|
|
3
3
|
import { n as defineOperationRoots, r as defineScalar, t as defineEnum } from "./schema-builder-B5zSZzZO.js";
|
|
4
4
|
|
|
5
5
|
//#region packages/core/src/types/type-foundation/modified-type-name.d.ts
|
|
@@ -11,5 +11,5 @@ declare function parseModifiedTypeName<TNameCandidate extends [string], TName ex
|
|
|
11
11
|
modifier: TModifier;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
|
-
export { AbstractFieldSelection, Adapter, AllInputTypeNames, AnyAdapter, AnyAssignableInput, AnyAssignableInputValue, AnyAssigningInput, AnyConstAssignableInput, AnyConstAssignableInputValue, AnyConstDirectiveAttachments, AnyDefaultValue, AnyDirectiveAttachments, AnyDirectiveMethod, AnyDirectiveRef, AnyDirectiveRefBrand, AnyFieldName, AnyFieldSelection, AnyFieldSelectionFactory, AnyFieldSelectionFactoryReturn, AnyFields, AnyFragment, AnyGqlContext, AnyGraphqlSchema, AnyMetadataAdapter, AnyNestedObject, AnyNestedUnion, AnyOperation, AnyOperationOf, AnyTypeName, AnyTypeSpecifier, AnyVarRef, AnyVarRefBrand, ApplyTypeModifier, AssignableInput, AssignableInputByFieldName, AttachmentShape, AttachmentToProperty, AttachmentsTupleToIntersection, ColocateHelper, ColocatedEntries, ColocatedFields, ConstAssignableInput, ConstAssignableInputValue, ConstValue, ConstValues, DeclaredVariables, DecrementDepth, DefaultAdapter, DefaultDepth, DefaultMetadataAdapter, DepthCounter, DirectiveArgValue, DirectiveBuilder, DirectiveLocation, DirectiveMethod, DirectiveRef, DirectiveRefInner, DocumentTransformArgs, DocumentTransformer, EmptyObject, EmptyPrebuiltTypeRegistry, EnumDefinition, EnumLookup, ExtractAdapterTypes, ExtractMetadata, ExtractMetadataAdapter, ExtractUnifiedAdapterTypes, FieldArgumentValue, FieldPath, FieldPathSegment, FieldSelectionFactories, FieldSelectionFactory, FieldSelectionFactoryFieldArguments, FieldSelectionFactoryObjectReturn, FieldSelectionFactoryPrimitiveReturn, FieldSelectionFactoryReturn, FieldSelectionFactoryUnionReturn, FieldSelectionTemplateOf, FieldsBuilder, FieldsBuilderTools, Fragment, FragmentBuilderFor, FragmentBuildersAll, FragmentInferMeta, FragmentMetaInfo, FragmentMetadataBuilder, FragmentMetadataBuilderTools, FragmentUsageRecord, GenerateInputObjectTypeOptions, GetAssignableType, GetConstAssignableType, GetInputTypeDepth, GetModifiedType, GetSignature, GqlElement, GqlElementAttachment, GqlElementComposer, GqlElementComposerOptions, GqlElementComposerWithSchema, GqlElementContext, GqlElementDefinitionFactory, HasPrebuiltFragment, HasPrebuiltOperation, Hidden, IfOmittable, InferField, InferFields, InferInputKind, InferInputProfile, InferOutputProfile, InputDefinition, InputDepthOverrides, InputEnumSpecifier, InputFieldRecord, InputInferrableTypeSpecifier, InputInputObjectSpecifier, InputScalarSpecifier, InputTypeKind, InputTypeMethod, InputTypeMethods, InputTypeSpecifier, InputTypeSpecifiers, IsDepthExhausted, MetadataAdapter, MetadataBuilder, MetadataBuilderTools, ModifiedTypeName, NestedObjectFieldsBuilder, NestedObjectFieldsBuilderTools, NestedUnionFieldsBuilder, NestedValue, NestedValueElement, NumberToDepth, ObjectDefinition, ObjectFieldRecord, ObjectTypeProfile, Operation, OperationDocumentTransformArgs, OperationDocumentTransformer, OperationInferMeta, OperationMetadata, OperationRoots, OperationType, OptionalArg, OutputEnumSpecifier, OutputInferrableTypeSpecifier, OutputObjectSpecifier, OutputScalarSpecifier, OutputTypeKind, OutputTypeSpecifier, OutputTypeSpecifiers, OutputTypenameSpecifier, OutputUnionSpecifier, PickTypeSpecifierByFieldName, PrebuiltEntryNotFound, PrebuiltFragmentInput, PrebuiltFragmentOutput, PrebuiltOperationInput, PrebuiltOperationOutput, PrebuiltTypeRegistry, PrebuiltUnknownElement, PrimitiveTypeProfile, ResolveInputProfileFromMeta, ResolveTypeFromMeta, ScalarDefinition, SchemaAwareGetNameAt, SchemaAwareGetValueAt, StandardDirectives, StripFunctions, StripSymbols, SwitchIfOmittable, Tuple, TypeFormatters, TypeModifier, TypeProfile, UnionDefinition, UnionMemberName, UnionToIntersection, UnionTypeRecord, ValidTypeModifier, VarBuilder, VarBuilderMethods, VarRef, VarRefInner, VarSpecifier, appendToPath, applyTypeModifier, buildArgumentValue, buildConstValueNode, buildDocument, buildOperationTypeNode, buildWithTypeModifier, calculateFieldType, calculateFieldsType, createColocateHelper, createDefaultAdapter, createDirectiveBuilder, createDirectiveMethod, createFieldFactories, createGqlElementComposer, createGqlFragmentComposers, createOperationComposerFactory, createStandardDirectives, createVarAssignments, createVarBuilder, createVarMethod, createVarMethodFactory, createVarRefFromNestedValue, createVarRefFromVariable, createVarRefs, defaultMetadataAdapter, defineEnum, defineOperationRoots, defineScalar, empty, generateInputObjectType, generateInputType, generateInputTypeFromSpecifiers, getCurrentFieldPath, getEnumType, getScalarInputType, getScalarOutputType, graphqlTypeToTypeScript, hidden, isDirectiveRef, isListType, parseModifiedTypeName, recordFragmentUsage, withFieldPath, withFragmentUsageCollection, wrapByKey };
|
|
14
|
+
export { AbstractFieldSelection, Adapter, AllInputTypeNames, AnyAdapter, AnyAssignableInput, AnyAssignableInputValue, AnyAssigningInput, AnyConstAssignableInput, AnyConstAssignableInputValue, AnyConstDirectiveAttachments, AnyDefaultValue, AnyDirectiveAttachments, AnyDirectiveMethod, AnyDirectiveRef, AnyDirectiveRefBrand, AnyFieldName, AnyFieldSelection, AnyFieldSelectionFactory, AnyFieldSelectionFactoryReturn, AnyFields, AnyFragment, AnyGqlContext, AnyGraphqlSchema, AnyMetadataAdapter, AnyNestedObject, AnyNestedUnion, AnyOperation, AnyOperationOf, AnyTypeName, AnyTypeSpecifier, AnyVarRef, AnyVarRefBrand, ApplyTypeModifier, AssignableInput, AssignableInputByFieldName, AttachmentShape, AttachmentToProperty, AttachmentsTupleToIntersection, ColocateHelper, ColocatedEntries, ColocatedFields, ConstAssignableInput, ConstAssignableInputValue, ConstValue, ConstValues, DeclaredVariables, DecrementDepth, DefaultAdapter, DefaultDepth, DefaultMetadataAdapter, DepthCounter, DirectiveArgValue, DirectiveArgumentSpecifier, DirectiveArgumentSpecifiers, DirectiveBuilder, DirectiveLocation, DirectiveMethod, DirectiveRef, DirectiveRefInner, DocumentTransformArgs, DocumentTransformer, EmptyObject, EmptyPrebuiltTypeRegistry, EnumDefinition, EnumLookup, ExecutableDirectiveLocation, ExtractAdapterTypes, ExtractMetadata, ExtractMetadataAdapter, ExtractUnifiedAdapterTypes, FieldArgumentValue, FieldPath, FieldPathSegment, FieldSelectionFactories, FieldSelectionFactory, FieldSelectionFactoryFieldArguments, FieldSelectionFactoryObjectReturn, FieldSelectionFactoryPrimitiveReturn, FieldSelectionFactoryReturn, FieldSelectionFactoryUnionReturn, FieldSelectionTemplateOf, FieldsBuilder, FieldsBuilderTools, Fragment, FragmentBuilderFor, FragmentBuildersAll, FragmentInferMeta, FragmentMetaInfo, FragmentMetadataBuilder, FragmentMetadataBuilderTools, FragmentUsageRecord, GenerateInputObjectTypeOptions, GetAssignableType, GetConstAssignableType, GetInputTypeDepth, GetModifiedType, GetSignature, GqlElement, GqlElementAttachment, GqlElementComposer, GqlElementComposerOptions, GqlElementComposerWithSchema, GqlElementContext, GqlElementDefinitionFactory, HasPrebuiltFragment, HasPrebuiltOperation, Hidden, IfOmittable, InferField, InferFields, InferInputKind, InferInputProfile, InferOutputProfile, InputDefinition, InputDepthOverrides, InputEnumSpecifier, InputFieldRecord, InputInferrableTypeSpecifier, InputInputObjectSpecifier, InputScalarSpecifier, InputTypeKind, InputTypeMethod, InputTypeMethods, InputTypeSpecifier, InputTypeSpecifiers, IsDepthExhausted, MetadataAdapter, MetadataBuilder, MetadataBuilderTools, ModifiedTypeName, NestedObjectFieldsBuilder, NestedObjectFieldsBuilderTools, NestedUnionFieldsBuilder, NestedValue, NestedValueElement, NumberToDepth, ObjectDefinition, ObjectFieldRecord, ObjectTypeProfile, Operation, OperationDocumentTransformArgs, OperationDocumentTransformer, OperationInferMeta, OperationMetadata, OperationRoots, OperationType, OptionalArg, OutputEnumSpecifier, OutputInferrableTypeSpecifier, OutputObjectSpecifier, OutputScalarSpecifier, OutputTypeKind, OutputTypeSpecifier, OutputTypeSpecifiers, OutputTypenameSpecifier, OutputUnionSpecifier, PickTypeSpecifierByFieldName, PrebuiltEntryNotFound, PrebuiltFragmentInput, PrebuiltFragmentOutput, PrebuiltOperationInput, PrebuiltOperationOutput, PrebuiltTypeRegistry, PrebuiltUnknownElement, PrimitiveTypeProfile, ResolveInputProfileFromMeta, ResolveTypeFromMeta, ScalarDefinition, SchemaAwareGetNameAt, SchemaAwareGetValueAt, StandardDirectives, StripFunctions, StripSymbols, SwitchIfOmittable, Tuple, TypeFormatters, TypeModifier, TypeProfile, TypeSystemDirectiveLocation, UnionDefinition, UnionMemberName, UnionToIntersection, UnionTypeRecord, ValidTypeModifier, VarBuilder, VarBuilderMethods, VarRef, VarRefInner, VarSpecifier, appendToPath, applyTypeModifier, buildArgumentValue, buildConstValueNode, buildDocument, buildOperationTypeNode, buildWithTypeModifier, calculateFieldType, calculateFieldsType, createColocateHelper, createDefaultAdapter, createDirectiveBuilder, createDirectiveMethod, createFieldFactories, createGqlElementComposer, createGqlFragmentComposers, createOperationComposerFactory, createStandardDirectives, createTypedDirectiveMethod, createVarAssignments, createVarBuilder, createVarMethod, createVarMethodFactory, createVarRefFromNestedValue, createVarRefFromVariable, createVarRefs, defaultMetadataAdapter, defineEnum, defineOperationRoots, defineScalar, empty, generateInputObjectType, generateInputType, generateInputTypeFromSpecifiers, getCurrentFieldPath, getEnumType, getScalarInputType, getScalarOutputType, graphqlTypeToTypeScript, hidden, isDirectiveRef, isListType, parseModifiedTypeName, recordFragmentUsage, withFieldPath, withFragmentUsageCollection, wrapByKey };
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -169,22 +169,21 @@ const validateDirectiveLocation = (directive, expectedLocation) => {
|
|
|
169
169
|
* @param schema - The schema for type lookups
|
|
170
170
|
* @returns Array of DirectiveNode for the GraphQL AST
|
|
171
171
|
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* in directives will be output as strings. This can be enhanced when
|
|
175
|
-
* directive definitions are added to the schema.
|
|
172
|
+
* Uses argument specifiers from DirectiveRef (when available via createTypedDirectiveMethod)
|
|
173
|
+
* to properly output enum arguments as Kind.ENUM instead of Kind.STRING.
|
|
176
174
|
*/
|
|
177
175
|
const buildDirectives = (directives, location, schema) => {
|
|
178
176
|
return directives.filter((d) => d instanceof DirectiveRef).map((directive) => {
|
|
179
177
|
validateDirectiveLocation(directive, location);
|
|
180
178
|
const inner = DirectiveRef.getInner(directive);
|
|
179
|
+
const argumentSpecifiers = inner.argumentSpecs ?? {};
|
|
181
180
|
return {
|
|
182
181
|
kind: Kind.DIRECTIVE,
|
|
183
182
|
name: {
|
|
184
183
|
kind: Kind.NAME,
|
|
185
184
|
value: inner.name
|
|
186
185
|
},
|
|
187
|
-
arguments: buildArguments(inner.arguments,
|
|
186
|
+
arguments: buildArguments(inner.arguments, argumentSpecifiers, schema)
|
|
188
187
|
};
|
|
189
188
|
});
|
|
190
189
|
};
|
|
@@ -486,6 +485,33 @@ const createDirectiveMethod = (name, locations) => {
|
|
|
486
485
|
});
|
|
487
486
|
};
|
|
488
487
|
/**
|
|
488
|
+
* Creates a typed directive method with argument type specifiers.
|
|
489
|
+
* Enables enum value output in directive arguments.
|
|
490
|
+
*
|
|
491
|
+
* @param name - The directive name (without @)
|
|
492
|
+
* @param locations - Valid locations where the directive can be applied
|
|
493
|
+
* @param argSpecs - Type specifiers for directive arguments
|
|
494
|
+
* @returns A function that creates DirectiveRef instances with argument type info
|
|
495
|
+
*
|
|
496
|
+
* @example
|
|
497
|
+
* ```typescript
|
|
498
|
+
* const authMethod = createTypedDirectiveMethod(
|
|
499
|
+
* "auth",
|
|
500
|
+
* ["FIELD"] as const,
|
|
501
|
+
* { role: { kind: "enum", name: "Role", modifier: "!" } }
|
|
502
|
+
* );
|
|
503
|
+
* const authDirective = authMethod({ role: "ADMIN" });
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
const createTypedDirectiveMethod = (name, locations, argSpecs) => {
|
|
507
|
+
return (args) => new DirectiveRef({
|
|
508
|
+
name,
|
|
509
|
+
arguments: args,
|
|
510
|
+
locations,
|
|
511
|
+
argumentSpecs: argSpecs
|
|
512
|
+
});
|
|
513
|
+
};
|
|
514
|
+
/**
|
|
489
515
|
* Standard directive locations for @skip and @include.
|
|
490
516
|
*/
|
|
491
517
|
const CONDITIONAL_DIRECTIVE_LOCATIONS = [
|
|
@@ -1701,5 +1727,5 @@ const generateInputTypeFromSpecifiers = (schema, specifiers, options = {}) => {
|
|
|
1701
1727
|
};
|
|
1702
1728
|
|
|
1703
1729
|
//#endregion
|
|
1704
|
-
export { Fragment, GqlElement, Operation, VarRef, appendToPath, applyTypeModifier, buildArgumentValue, buildConstValueNode, buildDocument, buildOperationTypeNode, buildWithTypeModifier, calculateFieldType, calculateFieldsType, createColocateHelper, createDefaultAdapter, createDirectiveBuilder, createDirectiveMethod, createFieldFactories, createGqlElementComposer, createGqlFragmentComposers, createOperationComposerFactory, createStandardDirectives, createVarAssignments, createVarBuilder, createVarMethod, createVarMethodFactory, createVarRefFromVariable, createVarRefs, defaultMetadataAdapter, defineEnum, defineOperationRoots, defineScalar, generateInputObjectType, generateInputType, generateInputTypeFromSpecifiers, getCurrentFieldPath, getEnumType, getScalarInputType, getScalarOutputType, graphqlTypeToTypeScript, isDirectiveRef, isListType, recordFragmentUsage, withFieldPath, withFragmentUsageCollection };
|
|
1730
|
+
export { Fragment, GqlElement, Operation, VarRef, appendToPath, applyTypeModifier, buildArgumentValue, buildConstValueNode, buildDocument, buildOperationTypeNode, buildWithTypeModifier, calculateFieldType, calculateFieldsType, createColocateHelper, createDefaultAdapter, createDirectiveBuilder, createDirectiveMethod, createFieldFactories, createGqlElementComposer, createGqlFragmentComposers, createOperationComposerFactory, createStandardDirectives, createTypedDirectiveMethod, createVarAssignments, createVarBuilder, createVarMethod, createVarMethodFactory, createVarRefFromVariable, createVarRefs, defaultMetadataAdapter, defineEnum, defineOperationRoots, defineScalar, generateInputObjectType, generateInputType, generateInputTypeFromSpecifiers, getCurrentFieldPath, getEnumType, getScalarInputType, getScalarOutputType, graphqlTypeToTypeScript, isDirectiveRef, isListType, recordFragmentUsage, withFieldPath, withFragmentUsageCollection };
|
|
1705
1731
|
//# sourceMappingURL=index.js.map
|