Comparing version 1.1.0-next.13 to 1.1.0-next.14
import { GraphQLField, GraphQLFieldConfig, GraphQLFieldConfigArgumentMap, GraphQLFieldConfigMap, GraphQLFieldResolver, GraphQLInputFieldConfig, GraphQLInputFieldConfigMap, GraphQLInputObjectType, GraphQLInputType, GraphQLInterfaceType, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLObjectType, GraphQLOutputType, GraphQLSchemaConfig, GraphQLType, printSchema } from 'graphql'; | ||
import { ArgsRecord } from './definitions/args'; | ||
import type { ArgsRecord } from './definitions/args'; | ||
import { InputDefinitionBlock, NexusInputFieldDef, NexusOutputFieldDef, OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import { NexusExtendInputTypeConfig, NexusExtendInputTypeDef } from './definitions/extendInputType'; | ||
import { NexusExtendTypeConfig, NexusExtendTypeDef } from './definitions/extendType'; | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import type { NexusExtendInputTypeConfig, NexusExtendInputTypeDef } from './definitions/extendInputType'; | ||
import type { NexusExtendTypeConfig, NexusExtendTypeDef } from './definitions/extendType'; | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import { FieldModificationDef, NexusInterfaceTypeConfig, NexusInterfaceTypeDef } from './definitions/interfaceType'; | ||
@@ -11,11 +11,11 @@ import { NexusObjectTypeConfig, NexusObjectTypeDef, ObjectDefinitionBlock } from './definitions/objectType'; | ||
import { AllNexusNamedInputTypeDefs, AllNexusNamedOutputTypeDefs, AllNexusNamedTypeDefs, NexusWrapKind } from './definitions/wrapping'; | ||
import { MissingType, NexusFeaturesInput, NexusGraphQLInputObjectTypeConfig, NexusGraphQLInterfaceTypeConfig, NexusGraphQLObjectTypeConfig, NexusGraphQLSchema, NonNullConfig, SourceTypings, TypingImport } from './definitions/_types'; | ||
import { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod'; | ||
import { DynamicOutputPropertyDef } from './dynamicProperty'; | ||
import type { MissingType, NexusFeaturesInput, NexusGraphQLInputObjectTypeConfig, NexusGraphQLInterfaceTypeConfig, NexusGraphQLObjectTypeConfig, NexusGraphQLSchema, NonNullConfig, SourceTypings, TypingImport } from './definitions/_types'; | ||
import type { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod'; | ||
import type { DynamicOutputPropertyDef } from './dynamicProperty'; | ||
import { NexusSchemaExtension } from './extensions'; | ||
import { CreateFieldResolverInfo, NexusPlugin, PluginConfig } from './plugin'; | ||
import { SourceTypesConfigOptions } from './typegenAutoConfig'; | ||
import { TypegenFormatFn } from './typegenFormatPrettier'; | ||
import { GetGen } from './typegenTypeHelpers'; | ||
import { RequiredDeeply } from './typeHelpersInternal'; | ||
import type { SourceTypesConfigOptions } from './typegenAutoConfig'; | ||
import type { TypegenFormatFn } from './typegenFormatPrettier'; | ||
import type { GetGen } from './typegenTypeHelpers'; | ||
import type { RequiredDeeply } from './typeHelpersInternal'; | ||
declare type NexusShapedOutput = { | ||
@@ -22,0 +22,0 @@ name: string; |
@@ -1,6 +0,6 @@ | ||
import { GraphQLCompositeType, GraphQLEnumType, GraphQLFieldConfig, GraphQLInputObjectType, GraphQLInputObjectTypeConfig, GraphQLInterfaceType, GraphQLInterfaceTypeConfig, GraphQLLeafType, GraphQLObjectType, GraphQLObjectTypeConfig, GraphQLScalarType, GraphQLSchema, GraphQLUnionType } from 'graphql'; | ||
import { NexusFieldExtension, NexusInputObjectTypeExtension, NexusInterfaceTypeExtension, NexusObjectTypeExtension, NexusSchemaExtension } from '../extensions'; | ||
import * as AbstractTypes from '../typegenAbstractTypes'; | ||
import { RequiredDeeply } from '../typeHelpersInternal'; | ||
export { AbstractTypes }; | ||
import type { GraphQLCompositeType, GraphQLEnumType, GraphQLFieldConfig, GraphQLInputObjectType, GraphQLInputObjectTypeConfig, GraphQLInterfaceType, GraphQLInterfaceTypeConfig, GraphQLLeafType, GraphQLObjectType, GraphQLObjectTypeConfig, GraphQLScalarType, GraphQLSchema, GraphQLUnionType } from 'graphql'; | ||
import type { NexusFieldExtension, NexusInputObjectTypeExtension, NexusInterfaceTypeExtension, NexusObjectTypeExtension, NexusSchemaExtension } from '../extensions'; | ||
import type * as AbstractTypes from '../typegenAbstractTypes'; | ||
import type { RequiredDeeply } from '../typeHelpersInternal'; | ||
export type { AbstractTypes }; | ||
export declare type Maybe<T> = T | null; | ||
@@ -7,0 +7,0 @@ export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; |
@@ -1,3 +0,1 @@ | ||
import * as AbstractTypes from '../typegenAbstractTypes'; | ||
export { AbstractTypes }; | ||
export var NexusTypes; | ||
@@ -4,0 +2,0 @@ (function (NexusTypes) { |
@@ -1,4 +0,4 @@ | ||
import { GraphQLScalarTypeConfig } from 'graphql'; | ||
import { AllInputTypes, GetGen2 } from '../typegenTypeHelpers'; | ||
import { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping'; | ||
import type { GraphQLScalarTypeConfig } from 'graphql'; | ||
import type { AllInputTypes, GetGen2 } from '../typegenTypeHelpers'; | ||
import type { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping'; | ||
export declare type ArgsRecord = Record<string, AllNexusArgsDefs>; | ||
@@ -5,0 +5,0 @@ export declare type CommonArgConfig = { |
@@ -1,3 +0,3 @@ | ||
import { GraphQLNamedType } from 'graphql'; | ||
import { SourceTypingDef } from './_types'; | ||
import type { GraphQLNamedType } from 'graphql'; | ||
import type { SourceTypingDef } from './_types'; | ||
export interface TypeExtensionConfig { | ||
@@ -4,0 +4,0 @@ asNexusMethod?: string; |
@@ -1,5 +0,5 @@ | ||
import { GraphQLFieldConfig, GraphQLFieldResolver, GraphQLInputFieldConfig } from 'graphql'; | ||
import { AllInputTypes, FieldResolver, GetGen, GetGen3, HasGen3, NeedsResolver } from '../typegenTypeHelpers'; | ||
import { ArgsRecord } from './args'; | ||
import { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping'; | ||
import type { GraphQLFieldConfig, GraphQLFieldResolver, GraphQLInputFieldConfig } from 'graphql'; | ||
import type { AllInputTypes, FieldResolver, GetGen, GetGen3, HasGen3, NeedsResolver } from '../typegenTypeHelpers'; | ||
import type { ArgsRecord } from './args'; | ||
import type { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping'; | ||
export interface CommonFieldConfig { | ||
@@ -6,0 +6,0 @@ /** The description to annotate the GraphQL SDL */ |
@@ -1,3 +0,3 @@ | ||
import { GetGen } from '../typegenTypeHelpers'; | ||
import { InputDefinitionBlock } from './definitionBlocks'; | ||
import type { GetGen } from '../typegenTypeHelpers'; | ||
import type { InputDefinitionBlock } from './definitionBlocks'; | ||
export interface NexusExtendInputTypeConfig<TypeName extends string> { | ||
@@ -4,0 +4,0 @@ type: TypeName; |
@@ -1,4 +0,4 @@ | ||
import { AllOutputTypesPossible } from '../typegenTypeHelpers'; | ||
import { ObjectDefinitionBlock } from './objectType'; | ||
import { IsSubscriptionType, SubscriptionBuilder } from './subscriptionType'; | ||
import type { AllOutputTypesPossible } from '../typegenTypeHelpers'; | ||
import type { ObjectDefinitionBlock } from './objectType'; | ||
import type { IsSubscriptionType, SubscriptionBuilder } from './subscriptionType'; | ||
export interface NexusExtendTypeConfig<TypeName extends string> { | ||
@@ -5,0 +5,0 @@ /** |
import { GraphQLInputObjectTypeConfig } from 'graphql'; | ||
import { NexusArgDef, NexusAsArgConfig } from './args'; | ||
import { InputDefinitionBlock } from './definitionBlocks'; | ||
import type { InputDefinitionBlock } from './definitionBlocks'; | ||
import { NonNullConfig } from './_types'; | ||
@@ -5,0 +5,0 @@ export declare type NexusInputObjectTypeConfig<TypeName extends string> = { |
import { GraphQLInterfaceTypeConfig } from 'graphql'; | ||
import { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers'; | ||
import { ArgsRecord } from './args'; | ||
import type { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers'; | ||
import type { ArgsRecord } from './args'; | ||
import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks'; | ||
@@ -5,0 +5,0 @@ import { AbstractTypes, NonNullConfig, SourceTypingDef } from './_types'; |
@@ -1,2 +0,2 @@ | ||
import { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import type { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import { NexusExtendTypeDef } from './extendType'; | ||
@@ -3,0 +3,0 @@ export declare type MutationFieldConfig<FieldName extends string> = FieldOutConfig<'Mutation', FieldName> | (() => FieldOutConfig<'Mutation', FieldName>); |
@@ -56,2 +56,2 @@ import { NexusNonNullableTypes } from './wrapping'; | ||
*/ | ||
export declare function nonNull<TypeName extends NexusNonNullableTypes>(type: TypeName): NexusNonNullDef<any> | (TypeName & import("graphql").GraphQLNonNull<any>); | ||
export declare function nonNull<TypeName extends NexusNonNullableTypes>(type: TypeName): NexusNonNullDef<any>; |
@@ -67,2 +67,16 @@ import { isNonNullType, isType } from 'graphql'; | ||
if (isNexusNonNullTypeDef(type) || isNonNullType(type)) { | ||
/* | ||
Ran into an issue around the generated return type for `nonNull()`, | ||
which produces: | ||
```ts | ||
NexusNonNullDef<any> | (TypeName & GraphQLNonNull<any>) | ||
``` | ||
This is problematic when you reach a decent amount of types, where you'll | ||
hit a `union type that is too complex to represent` error. Removing the | ||
right hand side of the clause resolves the issue, and the fact that it's a | ||
`GraphQLNonNull` type is irrelevant, so we can just cast it to | ||
`NexusNonNullDef<any>` here | ||
*/ | ||
return type; | ||
@@ -69,0 +83,0 @@ } |
import { GraphQLObjectType } from 'graphql'; | ||
import { InterfaceFieldsFor } from '../typegenTypeHelpers'; | ||
import type { InterfaceFieldsFor } from '../typegenTypeHelpers'; | ||
import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks'; | ||
import { FieldModification, FieldModificationDef, Implemented } from './interfaceType'; | ||
import type { FieldModification, FieldModificationDef, Implemented } from './interfaceType'; | ||
import { AbstractTypes, NonNullConfig, SourceTypingDef } from './_types'; | ||
@@ -6,0 +6,0 @@ export interface ObjectDefinitionBuilder extends OutputDefinitionBuilder { |
@@ -1,2 +0,2 @@ | ||
import { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import type { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import { NexusExtendTypeDef } from './extendType'; | ||
@@ -3,0 +3,0 @@ export declare type QueryFieldConfig<FieldName extends string> = FieldOutConfig<'Query', FieldName> | (() => FieldOutConfig<'Query', FieldName>); |
import { NexusExtendTypeDef } from './extendType'; | ||
import { SubscriptionBuilder, SubscriptionTypeConfig } from './subscriptionType'; | ||
import type { SubscriptionBuilder, SubscriptionTypeConfig } from './subscriptionType'; | ||
export declare type SubscriptionFieldConfig<FieldName extends string, Event> = SubscriptionTypeConfig<FieldName, Event> | (() => SubscriptionTypeConfig<FieldName, Event>); | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,6 +0,6 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
import { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue } from '../typegenTypeHelpers'; | ||
import { IsEqual } from '../typeHelpersInternal'; | ||
import { CommonOutputFieldConfig } from './definitionBlocks'; | ||
import { AllNexusOutputTypeDefs } from './wrapping'; | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import type { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue } from '../typegenTypeHelpers'; | ||
import type { IsEqual } from '../typeHelpersInternal'; | ||
import type { CommonOutputFieldConfig } from './definitionBlocks'; | ||
import type { AllNexusOutputTypeDefs } from './wrapping'; | ||
export declare type IsSubscriptionType<T> = IsEqual<T, 'Subscription'>; | ||
@@ -7,0 +7,0 @@ export interface SubscriptionTypeConfigBase<FieldName extends string, Event = any> { |
import { GraphQLUnionTypeConfig } from 'graphql'; | ||
import { GetGen } from '../typegenTypeHelpers'; | ||
import { NexusObjectTypeDef } from './objectType'; | ||
import type { GetGen } from '../typegenTypeHelpers'; | ||
import type { NexusObjectTypeDef } from './objectType'; | ||
import { AbstractTypes, SourceTypingDef } from './_types'; | ||
@@ -5,0 +5,0 @@ export interface UnionDefinitionBuilder { |
import { GraphQLInputType, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLType } from 'graphql'; | ||
import { DynamicInputMethodDef, DynamicOutputMethodDef } from '../dynamicMethod'; | ||
import { DynamicOutputPropertyDef } from '../dynamicProperty'; | ||
import { NexusPlugin } from '../plugin'; | ||
import { AllInputTypes, GetGen } from '../typegenTypeHelpers'; | ||
import type { DynamicInputMethodDef, DynamicOutputMethodDef } from '../dynamicMethod'; | ||
import type { DynamicOutputPropertyDef } from '../dynamicProperty'; | ||
import type { NexusPlugin } from '../plugin'; | ||
import type { AllInputTypes, GetGen } from '../typegenTypeHelpers'; | ||
import { PrintedGenTyping, PrintedGenTypingImport } from '../utils'; | ||
import { NexusArgDef } from './args'; | ||
import { NexusEnumTypeDef } from './enumType'; | ||
import { NexusExtendInputTypeDef } from './extendInputType'; | ||
import { NexusExtendTypeDef } from './extendType'; | ||
import { NexusInputObjectTypeDef } from './inputObjectType'; | ||
import { NexusInterfaceTypeDef } from './interfaceType'; | ||
import type { NexusEnumTypeDef } from './enumType'; | ||
import type { NexusExtendInputTypeDef } from './extendInputType'; | ||
import type { NexusExtendTypeDef } from './extendType'; | ||
import type { NexusInputObjectTypeDef } from './inputObjectType'; | ||
import type { NexusInterfaceTypeDef } from './interfaceType'; | ||
import { NexusListDef } from './list'; | ||
import { NexusNonNullDef } from './nonNull'; | ||
import { NexusNullDef } from './nullable'; | ||
import { NexusObjectTypeDef } from './objectType'; | ||
import { NexusScalarTypeDef } from './scalarType'; | ||
import { NexusUnionTypeDef } from './unionType'; | ||
import type { NexusObjectTypeDef } from './objectType'; | ||
import type { NexusScalarTypeDef } from './scalarType'; | ||
import type { NexusUnionTypeDef } from './unionType'; | ||
import { NexusTypes, NexusWrappedSymbol } from './_types'; | ||
@@ -20,0 +20,0 @@ export declare type AllNexusNamedInputTypeDefs<T extends string = any> = NexusInputObjectTypeDef<T> | NexusEnumTypeDef<T> | NexusScalarTypeDef<T> | Exclude<GraphQLInputType, GraphQLList<any> | GraphQLNonNull<any>>; |
@@ -1,4 +0,4 @@ | ||
import { PluginBuilderLens } from './builder'; | ||
import { InputDefinitionBlock, OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import { NexusWrapKind } from './definitions/wrapping'; | ||
import type { PluginBuilderLens } from './builder'; | ||
import type { InputDefinitionBlock, OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import type { NexusWrapKind } from './definitions/wrapping'; | ||
export declare type OutputFactoryConfig<T> = { | ||
@@ -5,0 +5,0 @@ /** The name of the type this field is being declared on */ |
@@ -1,4 +0,4 @@ | ||
import { SchemaBuilder } from './builder'; | ||
import { OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import { BaseExtensionConfig } from './dynamicMethod'; | ||
import type { SchemaBuilder } from './builder'; | ||
import type { OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import type { BaseExtensionConfig } from './dynamicMethod'; | ||
export declare type OutputPropertyFactoryConfig<T> = { | ||
@@ -5,0 +5,0 @@ stage: 'walk' | 'build'; |
import { GraphQLNamedType } from 'graphql'; | ||
import { DynamicFieldDefs, SchemaConfig } from './builder'; | ||
import { SourceTypingDef, SourceTypings } from './definitions/_types'; | ||
import { NexusOutputFieldConfig } from './definitions/definitionBlocks'; | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import { NexusInterfaceTypeConfig } from './definitions/interfaceType'; | ||
import { NexusObjectTypeConfig } from './definitions/objectType'; | ||
import type { DynamicFieldDefs, SchemaConfig } from './builder'; | ||
import type { SourceTypingDef, SourceTypings } from './definitions/_types'; | ||
import type { NexusOutputFieldConfig } from './definitions/definitionBlocks'; | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import type { NexusInterfaceTypeConfig } from './definitions/interfaceType'; | ||
import type { NexusObjectTypeConfig } from './definitions/objectType'; | ||
export declare type NexusGraphQLNamedType = GraphQLNamedType & { | ||
@@ -9,0 +9,0 @@ extensions?: { |
@@ -1,11 +0,11 @@ | ||
import { GraphQLFieldResolver, GraphQLInterfaceType, GraphQLResolveInfo, GraphQLSchema } from 'graphql'; | ||
import { PluginBuilderLens, SchemaConfig } from './builder'; | ||
import type { GraphQLFieldResolver, GraphQLInterfaceType, GraphQLResolveInfo, GraphQLSchema } from 'graphql'; | ||
import type { PluginBuilderLens, SchemaConfig } from './builder'; | ||
import { Maybe, NexusGraphQLFieldConfig, NexusGraphQLInterfaceTypeConfig, NexusGraphQLObjectTypeConfig, Omit } from './definitions/_types'; | ||
import { InputDefinitionBlock, NexusOutputFieldDef, NexusInputFieldDef } from './definitions/definitionBlocks'; | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import { NexusObjectTypeConfig, ObjectDefinitionBlock } from './definitions/objectType'; | ||
import { NexusSchemaExtension } from './extensions'; | ||
import type { InputDefinitionBlock, NexusOutputFieldDef, NexusInputFieldDef } from './definitions/definitionBlocks'; | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import type { NexusObjectTypeConfig, ObjectDefinitionBlock } from './definitions/objectType'; | ||
import type { NexusSchemaExtension } from './extensions'; | ||
import { PrintedGenTyping, PrintedGenTypingImport } from './utils'; | ||
import { NexusFinalArgConfig } from './definitions/args'; | ||
import { UnwrapPromise } from './typeHelpersInternal'; | ||
import type { NexusFinalArgConfig } from './definitions/args'; | ||
import type { UnwrapPromise } from './typeHelpersInternal'; | ||
export { PluginBuilderLens }; | ||
@@ -12,0 +12,0 @@ export declare type CreateFieldResolverInfo<FieldExt = any, TypeExt = any> = { |
import { GraphQLFieldResolver, GraphQLResolveInfo } from 'graphql'; | ||
import { ArgsRecord } from '../definitions/args'; | ||
import { CommonFieldConfig, FieldOutConfig } from '../definitions/definitionBlocks'; | ||
import type { CommonFieldConfig, FieldOutConfig } from '../definitions/definitionBlocks'; | ||
import { NexusNonNullDef } from '../definitions/nonNull'; | ||
@@ -8,4 +8,4 @@ import { NexusNullDef } from '../definitions/nullable'; | ||
import { AllNexusNamedOutputTypeDefs } from '../definitions/wrapping'; | ||
import { NonNullConfig } from '../definitions/_types'; | ||
import { ArgsValue, FieldTypeName, GetGen, MaybePromise, MaybePromiseDeep, ResultValue, SourceValue } from '../typegenTypeHelpers'; | ||
import type { NonNullConfig } from '../definitions/_types'; | ||
import type { ArgsValue, FieldTypeName, GetGen, MaybePromise, MaybePromiseDeep, ResultValue, SourceValue } from '../typegenTypeHelpers'; | ||
export interface ConnectionPluginConfig { | ||
@@ -256,3 +256,3 @@ /** | ||
export declare const ForwardOnlyStrictArgs: { | ||
first: NexusNonNullDef<any> | (import("../definitions/args").NexusArgDef<any> & import("graphql").GraphQLNonNull<any>); | ||
first: NexusNonNullDef<any>; | ||
after: NexusNullDef<any>; | ||
@@ -265,3 +265,3 @@ }; | ||
export declare const BackwardOnlyStrictArgs: { | ||
last: NexusNonNullDef<any> | (import("../definitions/args").NexusArgDef<any> & import("graphql").GraphQLNonNull<any>); | ||
last: NexusNonNullDef<any>; | ||
before: NexusNullDef<any>; | ||
@@ -268,0 +268,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
import { ArgsValue, GetGen, MaybePromise, SourceValue } from '../typegenTypeHelpers'; | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import type { ArgsValue, GetGen, MaybePromise, SourceValue } from '../typegenTypeHelpers'; | ||
export declare type FieldAuthorizeResolver<TypeName extends string, FieldName extends string> = (root: SourceValue<TypeName>, args: ArgsValue<TypeName, FieldName>, context: GetGen<'context'>, info: GraphQLResolveInfo) => MaybePromise<boolean | Error>; | ||
@@ -4,0 +4,0 @@ export interface FieldAuthorizePluginErrorConfig { |
import { GraphQLNullableType, GraphQLResolveInfo } from 'graphql'; | ||
import { GraphQLPossibleOutputs } from '../definitions/_types'; | ||
import { AllOutputTypes, GetGen, GetGen2 } from '../typegenTypeHelpers'; | ||
import type { GraphQLPossibleOutputs } from '../definitions/_types'; | ||
import type { AllOutputTypes, GetGen, GetGen2 } from '../typegenTypeHelpers'; | ||
export interface NullabilityPluginFallbackFn { | ||
@@ -5,0 +5,0 @@ ctx: GetGen<'context'>; |
@@ -1,3 +0,3 @@ | ||
import { GraphQLField } from 'graphql'; | ||
import { ArgsValue, GetGen, SourceValue } from '../core'; | ||
import type { GraphQLField } from 'graphql'; | ||
import type { ArgsValue, GetGen, SourceValue } from '../core'; | ||
export declare type QueryComplexityEstimatorArgs<TypeName extends string, FieldName extends string> = { | ||
@@ -4,0 +4,0 @@ type: SourceValue<TypeName>; |
@@ -1,4 +0,4 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
import { AbstractTypeResolver, GetGen, GetGen2, IsFeatureEnabled2, MaybePromise, SourceValue } from './typegenTypeHelpers'; | ||
import { ConditionalKeys, ConditionalPick, ValueOf } from './typeHelpersInternal'; | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import type { AbstractTypeResolver, GetGen, GetGen2, IsFeatureEnabled2, MaybePromise, SourceValue } from './typegenTypeHelpers'; | ||
import type { ConditionalKeys, ConditionalPick, ValueOf } from './typeHelpersInternal'; | ||
/** | ||
@@ -5,0 +5,0 @@ * Returns a union of all the type names of the members of an abstract type |
import { GraphQLNamedType, GraphQLSchema } from 'graphql'; | ||
import { TypegenInfo } from './builder'; | ||
import { TypingImport } from './definitions/_types'; | ||
import type { TypegenInfo } from './builder'; | ||
import type { TypingImport } from './definitions/_types'; | ||
/** Any common types / constants that would otherwise be circular-imported */ | ||
@@ -5,0 +5,0 @@ export declare const SCALAR_TYPES: { |
@@ -163,3 +163,3 @@ import { __awaiter } from "tslib"; | ||
const safeImportPath = importPath.replace(/\\+/g, '/'); | ||
imports.push(`import ${glob ? '* as ' : ''}${alias} from "${safeImportPath}"`); | ||
imports.push(`import type ${glob ? '* as ' : ''}${alias} from "${safeImportPath}"`); | ||
}); | ||
@@ -166,0 +166,0 @@ const typegenInfo = { |
import { GraphQLSchema } from 'graphql'; | ||
import { BuilderConfigInput, TypegenInfo } from './builder'; | ||
import { NexusGraphQLSchema } from './definitions/_types'; | ||
import type { BuilderConfigInput, TypegenInfo } from './builder'; | ||
import type { NexusGraphQLSchema } from './definitions/_types'; | ||
export interface TypegenMetadataConfig extends Omit<BuilderConfigInput, 'outputs' | 'shouldGenerateArtifacts'> { | ||
@@ -5,0 +5,0 @@ nexusSchemaImportId?: string; |
import { GraphQLAbstractType, GraphQLArgument, GraphQLField, GraphQLInputField, GraphQLInputType, GraphQLInterfaceType, GraphQLObjectType, GraphQLOutputType, GraphQLScalarType, GraphQLUnionType } from 'graphql'; | ||
import { TypegenInfo } from './builder'; | ||
import { NexusGraphQLSchema } from './definitions/_types'; | ||
import { StringLike } from './plugin'; | ||
import type { TypegenInfo } from './builder'; | ||
import type { NexusGraphQLSchema } from './definitions/_types'; | ||
import type { StringLike } from './plugin'; | ||
import { GroupedTypes, PrintedGenTypingImport } from './utils'; | ||
@@ -6,0 +6,0 @@ declare type TypeFieldMapping = Record<string, Record<string, [string, string]>>; |
@@ -147,3 +147,3 @@ import { __rest } from "tslib"; | ||
eachObj(importMap, (val, key) => { | ||
imports.push(`import { ${Array.from(val).join(', ')} } from ${JSON.stringify(key)}`); | ||
imports.push(`import type { ${Array.from(val).join(', ')} } from ${JSON.stringify(key)}`); | ||
}); | ||
@@ -163,3 +163,3 @@ eachObj(this.printImports, (val, key) => { | ||
} | ||
imports.push(`import ${idents.join(', ')} from ${JSON.stringify(key)}`); | ||
imports.push(`import type ${idents.join(', ')} from ${JSON.stringify(key)}`); | ||
}); | ||
@@ -166,0 +166,0 @@ return imports.join('\n'); |
@@ -1,4 +0,4 @@ | ||
import { GraphQLAbstractType, GraphQLResolveInfo } from 'graphql'; | ||
import { NexusInterfaceTypeDef } from './definitions/interfaceType'; | ||
import { NexusObjectTypeDef } from './definitions/objectType'; | ||
import type { GraphQLAbstractType, GraphQLResolveInfo } from 'graphql'; | ||
import type { NexusInterfaceTypeDef } from './definitions/interfaceType'; | ||
import type { NexusObjectTypeDef } from './definitions/objectType'; | ||
declare global { | ||
@@ -5,0 +5,0 @@ interface NexusGen { |
@@ -1,4 +0,4 @@ | ||
import { BuilderConfigInput } from './builder'; | ||
import { TypegenMetadataConfig } from './typegenMetadata'; | ||
import type { BuilderConfigInput } from './builder'; | ||
import type { TypegenMetadataConfig } from './typegenMetadata'; | ||
/** Normalizes the builder config into the config we need for typegen */ | ||
export declare function resolveTypegenConfig(config: BuilderConfigInput): TypegenMetadataConfig; |
import { GraphQLField, GraphQLFieldConfig, GraphQLFieldConfigArgumentMap, GraphQLFieldConfigMap, GraphQLFieldResolver, GraphQLInputFieldConfig, GraphQLInputFieldConfigMap, GraphQLInputObjectType, GraphQLInputType, GraphQLInterfaceType, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLObjectType, GraphQLOutputType, GraphQLSchemaConfig, GraphQLType, printSchema } from 'graphql'; | ||
import { ArgsRecord } from './definitions/args'; | ||
import type { ArgsRecord } from './definitions/args'; | ||
import { InputDefinitionBlock, NexusInputFieldDef, NexusOutputFieldDef, OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import { NexusExtendInputTypeConfig, NexusExtendInputTypeDef } from './definitions/extendInputType'; | ||
import { NexusExtendTypeConfig, NexusExtendTypeDef } from './definitions/extendType'; | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import type { NexusExtendInputTypeConfig, NexusExtendInputTypeDef } from './definitions/extendInputType'; | ||
import type { NexusExtendTypeConfig, NexusExtendTypeDef } from './definitions/extendType'; | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import { FieldModificationDef, NexusInterfaceTypeConfig, NexusInterfaceTypeDef } from './definitions/interfaceType'; | ||
@@ -11,11 +11,11 @@ import { NexusObjectTypeConfig, NexusObjectTypeDef, ObjectDefinitionBlock } from './definitions/objectType'; | ||
import { AllNexusNamedInputTypeDefs, AllNexusNamedOutputTypeDefs, AllNexusNamedTypeDefs, NexusWrapKind } from './definitions/wrapping'; | ||
import { MissingType, NexusFeaturesInput, NexusGraphQLInputObjectTypeConfig, NexusGraphQLInterfaceTypeConfig, NexusGraphQLObjectTypeConfig, NexusGraphQLSchema, NonNullConfig, SourceTypings, TypingImport } from './definitions/_types'; | ||
import { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod'; | ||
import { DynamicOutputPropertyDef } from './dynamicProperty'; | ||
import type { MissingType, NexusFeaturesInput, NexusGraphQLInputObjectTypeConfig, NexusGraphQLInterfaceTypeConfig, NexusGraphQLObjectTypeConfig, NexusGraphQLSchema, NonNullConfig, SourceTypings, TypingImport } from './definitions/_types'; | ||
import type { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod'; | ||
import type { DynamicOutputPropertyDef } from './dynamicProperty'; | ||
import { NexusSchemaExtension } from './extensions'; | ||
import { CreateFieldResolverInfo, NexusPlugin, PluginConfig } from './plugin'; | ||
import { SourceTypesConfigOptions } from './typegenAutoConfig'; | ||
import { TypegenFormatFn } from './typegenFormatPrettier'; | ||
import { GetGen } from './typegenTypeHelpers'; | ||
import { RequiredDeeply } from './typeHelpersInternal'; | ||
import type { SourceTypesConfigOptions } from './typegenAutoConfig'; | ||
import type { TypegenFormatFn } from './typegenFormatPrettier'; | ||
import type { GetGen } from './typegenTypeHelpers'; | ||
import type { RequiredDeeply } from './typeHelpersInternal'; | ||
declare type NexusShapedOutput = { | ||
@@ -22,0 +22,0 @@ name: string; |
@@ -1,6 +0,6 @@ | ||
import { GraphQLCompositeType, GraphQLEnumType, GraphQLFieldConfig, GraphQLInputObjectType, GraphQLInputObjectTypeConfig, GraphQLInterfaceType, GraphQLInterfaceTypeConfig, GraphQLLeafType, GraphQLObjectType, GraphQLObjectTypeConfig, GraphQLScalarType, GraphQLSchema, GraphQLUnionType } from 'graphql'; | ||
import { NexusFieldExtension, NexusInputObjectTypeExtension, NexusInterfaceTypeExtension, NexusObjectTypeExtension, NexusSchemaExtension } from '../extensions'; | ||
import * as AbstractTypes from '../typegenAbstractTypes'; | ||
import { RequiredDeeply } from '../typeHelpersInternal'; | ||
export { AbstractTypes }; | ||
import type { GraphQLCompositeType, GraphQLEnumType, GraphQLFieldConfig, GraphQLInputObjectType, GraphQLInputObjectTypeConfig, GraphQLInterfaceType, GraphQLInterfaceTypeConfig, GraphQLLeafType, GraphQLObjectType, GraphQLObjectTypeConfig, GraphQLScalarType, GraphQLSchema, GraphQLUnionType } from 'graphql'; | ||
import type { NexusFieldExtension, NexusInputObjectTypeExtension, NexusInterfaceTypeExtension, NexusObjectTypeExtension, NexusSchemaExtension } from '../extensions'; | ||
import type * as AbstractTypes from '../typegenAbstractTypes'; | ||
import type { RequiredDeeply } from '../typeHelpersInternal'; | ||
export type { AbstractTypes }; | ||
export declare type Maybe<T> = T | null; | ||
@@ -7,0 +7,0 @@ export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.withNexusSymbol = exports.NexusWrappedSymbol = exports.NexusTypes = exports.AbstractTypes = void 0; | ||
const tslib_1 = require("tslib"); | ||
const AbstractTypes = tslib_1.__importStar(require("../typegenAbstractTypes")); | ||
exports.AbstractTypes = AbstractTypes; | ||
exports.withNexusSymbol = exports.NexusWrappedSymbol = exports.NexusTypes = void 0; | ||
var NexusTypes; | ||
@@ -8,0 +5,0 @@ (function (NexusTypes) { |
@@ -1,4 +0,4 @@ | ||
import { GraphQLScalarTypeConfig } from 'graphql'; | ||
import { AllInputTypes, GetGen2 } from '../typegenTypeHelpers'; | ||
import { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping'; | ||
import type { GraphQLScalarTypeConfig } from 'graphql'; | ||
import type { AllInputTypes, GetGen2 } from '../typegenTypeHelpers'; | ||
import type { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping'; | ||
export declare type ArgsRecord = Record<string, AllNexusArgsDefs>; | ||
@@ -5,0 +5,0 @@ export declare type CommonArgConfig = { |
@@ -1,3 +0,3 @@ | ||
import { GraphQLNamedType } from 'graphql'; | ||
import { SourceTypingDef } from './_types'; | ||
import type { GraphQLNamedType } from 'graphql'; | ||
import type { SourceTypingDef } from './_types'; | ||
export interface TypeExtensionConfig { | ||
@@ -4,0 +4,0 @@ asNexusMethod?: string; |
@@ -1,5 +0,5 @@ | ||
import { GraphQLFieldConfig, GraphQLFieldResolver, GraphQLInputFieldConfig } from 'graphql'; | ||
import { AllInputTypes, FieldResolver, GetGen, GetGen3, HasGen3, NeedsResolver } from '../typegenTypeHelpers'; | ||
import { ArgsRecord } from './args'; | ||
import { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping'; | ||
import type { GraphQLFieldConfig, GraphQLFieldResolver, GraphQLInputFieldConfig } from 'graphql'; | ||
import type { AllInputTypes, FieldResolver, GetGen, GetGen3, HasGen3, NeedsResolver } from '../typegenTypeHelpers'; | ||
import type { ArgsRecord } from './args'; | ||
import type { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping'; | ||
export interface CommonFieldConfig { | ||
@@ -6,0 +6,0 @@ /** The description to annotate the GraphQL SDL */ |
@@ -1,3 +0,3 @@ | ||
import { GetGen } from '../typegenTypeHelpers'; | ||
import { InputDefinitionBlock } from './definitionBlocks'; | ||
import type { GetGen } from '../typegenTypeHelpers'; | ||
import type { InputDefinitionBlock } from './definitionBlocks'; | ||
export interface NexusExtendInputTypeConfig<TypeName extends string> { | ||
@@ -4,0 +4,0 @@ type: TypeName; |
@@ -1,4 +0,4 @@ | ||
import { AllOutputTypesPossible } from '../typegenTypeHelpers'; | ||
import { ObjectDefinitionBlock } from './objectType'; | ||
import { IsSubscriptionType, SubscriptionBuilder } from './subscriptionType'; | ||
import type { AllOutputTypesPossible } from '../typegenTypeHelpers'; | ||
import type { ObjectDefinitionBlock } from './objectType'; | ||
import type { IsSubscriptionType, SubscriptionBuilder } from './subscriptionType'; | ||
export interface NexusExtendTypeConfig<TypeName extends string> { | ||
@@ -5,0 +5,0 @@ /** |
import { GraphQLInputObjectTypeConfig } from 'graphql'; | ||
import { NexusArgDef, NexusAsArgConfig } from './args'; | ||
import { InputDefinitionBlock } from './definitionBlocks'; | ||
import type { InputDefinitionBlock } from './definitionBlocks'; | ||
import { NonNullConfig } from './_types'; | ||
@@ -5,0 +5,0 @@ export declare type NexusInputObjectTypeConfig<TypeName extends string> = { |
import { GraphQLInterfaceTypeConfig } from 'graphql'; | ||
import { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers'; | ||
import { ArgsRecord } from './args'; | ||
import type { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers'; | ||
import type { ArgsRecord } from './args'; | ||
import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks'; | ||
@@ -5,0 +5,0 @@ import { AbstractTypes, NonNullConfig, SourceTypingDef } from './_types'; |
@@ -1,2 +0,2 @@ | ||
import { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import type { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import { NexusExtendTypeDef } from './extendType'; | ||
@@ -3,0 +3,0 @@ export declare type MutationFieldConfig<FieldName extends string> = FieldOutConfig<'Mutation', FieldName> | (() => FieldOutConfig<'Mutation', FieldName>); |
@@ -56,2 +56,2 @@ import { NexusNonNullableTypes } from './wrapping'; | ||
*/ | ||
export declare function nonNull<TypeName extends NexusNonNullableTypes>(type: TypeName): NexusNonNullDef<any> | (TypeName & import("graphql").GraphQLNonNull<any>); | ||
export declare function nonNull<TypeName extends NexusNonNullableTypes>(type: TypeName): NexusNonNullDef<any>; |
@@ -71,2 +71,16 @@ "use strict"; | ||
if (wrapping_1.isNexusNonNullTypeDef(type) || graphql_1.isNonNullType(type)) { | ||
/* | ||
Ran into an issue around the generated return type for `nonNull()`, | ||
which produces: | ||
```ts | ||
NexusNonNullDef<any> | (TypeName & GraphQLNonNull<any>) | ||
``` | ||
This is problematic when you reach a decent amount of types, where you'll | ||
hit a `union type that is too complex to represent` error. Removing the | ||
right hand side of the clause resolves the issue, and the fact that it's a | ||
`GraphQLNonNull` type is irrelevant, so we can just cast it to | ||
`NexusNonNullDef<any>` here | ||
*/ | ||
return type; | ||
@@ -73,0 +87,0 @@ } |
import { GraphQLObjectType } from 'graphql'; | ||
import { InterfaceFieldsFor } from '../typegenTypeHelpers'; | ||
import type { InterfaceFieldsFor } from '../typegenTypeHelpers'; | ||
import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks'; | ||
import { FieldModification, FieldModificationDef, Implemented } from './interfaceType'; | ||
import type { FieldModification, FieldModificationDef, Implemented } from './interfaceType'; | ||
import { AbstractTypes, NonNullConfig, SourceTypingDef } from './_types'; | ||
@@ -6,0 +6,0 @@ export interface ObjectDefinitionBuilder extends OutputDefinitionBuilder { |
@@ -1,2 +0,2 @@ | ||
import { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import type { FieldOutConfig, OutputDefinitionBlock } from '../core'; | ||
import { NexusExtendTypeDef } from './extendType'; | ||
@@ -3,0 +3,0 @@ export declare type QueryFieldConfig<FieldName extends string> = FieldOutConfig<'Query', FieldName> | (() => FieldOutConfig<'Query', FieldName>); |
import { NexusExtendTypeDef } from './extendType'; | ||
import { SubscriptionBuilder, SubscriptionTypeConfig } from './subscriptionType'; | ||
import type { SubscriptionBuilder, SubscriptionTypeConfig } from './subscriptionType'; | ||
export declare type SubscriptionFieldConfig<FieldName extends string, Event> = SubscriptionTypeConfig<FieldName, Event> | (() => SubscriptionTypeConfig<FieldName, Event>); | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,6 +0,6 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
import { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue } from '../typegenTypeHelpers'; | ||
import { IsEqual } from '../typeHelpersInternal'; | ||
import { CommonOutputFieldConfig } from './definitionBlocks'; | ||
import { AllNexusOutputTypeDefs } from './wrapping'; | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import type { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue } from '../typegenTypeHelpers'; | ||
import type { IsEqual } from '../typeHelpersInternal'; | ||
import type { CommonOutputFieldConfig } from './definitionBlocks'; | ||
import type { AllNexusOutputTypeDefs } from './wrapping'; | ||
export declare type IsSubscriptionType<T> = IsEqual<T, 'Subscription'>; | ||
@@ -7,0 +7,0 @@ export interface SubscriptionTypeConfigBase<FieldName extends string, Event = any> { |
import { GraphQLUnionTypeConfig } from 'graphql'; | ||
import { GetGen } from '../typegenTypeHelpers'; | ||
import { NexusObjectTypeDef } from './objectType'; | ||
import type { GetGen } from '../typegenTypeHelpers'; | ||
import type { NexusObjectTypeDef } from './objectType'; | ||
import { AbstractTypes, SourceTypingDef } from './_types'; | ||
@@ -5,0 +5,0 @@ export interface UnionDefinitionBuilder { |
import { GraphQLInputType, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLType } from 'graphql'; | ||
import { DynamicInputMethodDef, DynamicOutputMethodDef } from '../dynamicMethod'; | ||
import { DynamicOutputPropertyDef } from '../dynamicProperty'; | ||
import { NexusPlugin } from '../plugin'; | ||
import { AllInputTypes, GetGen } from '../typegenTypeHelpers'; | ||
import type { DynamicInputMethodDef, DynamicOutputMethodDef } from '../dynamicMethod'; | ||
import type { DynamicOutputPropertyDef } from '../dynamicProperty'; | ||
import type { NexusPlugin } from '../plugin'; | ||
import type { AllInputTypes, GetGen } from '../typegenTypeHelpers'; | ||
import { PrintedGenTyping, PrintedGenTypingImport } from '../utils'; | ||
import { NexusArgDef } from './args'; | ||
import { NexusEnumTypeDef } from './enumType'; | ||
import { NexusExtendInputTypeDef } from './extendInputType'; | ||
import { NexusExtendTypeDef } from './extendType'; | ||
import { NexusInputObjectTypeDef } from './inputObjectType'; | ||
import { NexusInterfaceTypeDef } from './interfaceType'; | ||
import type { NexusEnumTypeDef } from './enumType'; | ||
import type { NexusExtendInputTypeDef } from './extendInputType'; | ||
import type { NexusExtendTypeDef } from './extendType'; | ||
import type { NexusInputObjectTypeDef } from './inputObjectType'; | ||
import type { NexusInterfaceTypeDef } from './interfaceType'; | ||
import { NexusListDef } from './list'; | ||
import { NexusNonNullDef } from './nonNull'; | ||
import { NexusNullDef } from './nullable'; | ||
import { NexusObjectTypeDef } from './objectType'; | ||
import { NexusScalarTypeDef } from './scalarType'; | ||
import { NexusUnionTypeDef } from './unionType'; | ||
import type { NexusObjectTypeDef } from './objectType'; | ||
import type { NexusScalarTypeDef } from './scalarType'; | ||
import type { NexusUnionTypeDef } from './unionType'; | ||
import { NexusTypes, NexusWrappedSymbol } from './_types'; | ||
@@ -20,0 +20,0 @@ export declare type AllNexusNamedInputTypeDefs<T extends string = any> = NexusInputObjectTypeDef<T> | NexusEnumTypeDef<T> | NexusScalarTypeDef<T> | Exclude<GraphQLInputType, GraphQLList<any> | GraphQLNonNull<any>>; |
@@ -1,4 +0,4 @@ | ||
import { PluginBuilderLens } from './builder'; | ||
import { InputDefinitionBlock, OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import { NexusWrapKind } from './definitions/wrapping'; | ||
import type { PluginBuilderLens } from './builder'; | ||
import type { InputDefinitionBlock, OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import type { NexusWrapKind } from './definitions/wrapping'; | ||
export declare type OutputFactoryConfig<T> = { | ||
@@ -5,0 +5,0 @@ /** The name of the type this field is being declared on */ |
@@ -1,4 +0,4 @@ | ||
import { SchemaBuilder } from './builder'; | ||
import { OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import { BaseExtensionConfig } from './dynamicMethod'; | ||
import type { SchemaBuilder } from './builder'; | ||
import type { OutputDefinitionBlock } from './definitions/definitionBlocks'; | ||
import type { BaseExtensionConfig } from './dynamicMethod'; | ||
export declare type OutputPropertyFactoryConfig<T> = { | ||
@@ -5,0 +5,0 @@ stage: 'walk' | 'build'; |
import { GraphQLNamedType } from 'graphql'; | ||
import { DynamicFieldDefs, SchemaConfig } from './builder'; | ||
import { SourceTypingDef, SourceTypings } from './definitions/_types'; | ||
import { NexusOutputFieldConfig } from './definitions/definitionBlocks'; | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import { NexusInterfaceTypeConfig } from './definitions/interfaceType'; | ||
import { NexusObjectTypeConfig } from './definitions/objectType'; | ||
import type { DynamicFieldDefs, SchemaConfig } from './builder'; | ||
import type { SourceTypingDef, SourceTypings } from './definitions/_types'; | ||
import type { NexusOutputFieldConfig } from './definitions/definitionBlocks'; | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import type { NexusInterfaceTypeConfig } from './definitions/interfaceType'; | ||
import type { NexusObjectTypeConfig } from './definitions/objectType'; | ||
export declare type NexusGraphQLNamedType = GraphQLNamedType & { | ||
@@ -9,0 +9,0 @@ extensions?: { |
@@ -1,11 +0,11 @@ | ||
import { GraphQLFieldResolver, GraphQLInterfaceType, GraphQLResolveInfo, GraphQLSchema } from 'graphql'; | ||
import { PluginBuilderLens, SchemaConfig } from './builder'; | ||
import type { GraphQLFieldResolver, GraphQLInterfaceType, GraphQLResolveInfo, GraphQLSchema } from 'graphql'; | ||
import type { PluginBuilderLens, SchemaConfig } from './builder'; | ||
import { Maybe, NexusGraphQLFieldConfig, NexusGraphQLInterfaceTypeConfig, NexusGraphQLObjectTypeConfig, Omit } from './definitions/_types'; | ||
import { InputDefinitionBlock, NexusOutputFieldDef, NexusInputFieldDef } from './definitions/definitionBlocks'; | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import { NexusObjectTypeConfig, ObjectDefinitionBlock } from './definitions/objectType'; | ||
import { NexusSchemaExtension } from './extensions'; | ||
import type { InputDefinitionBlock, NexusOutputFieldDef, NexusInputFieldDef } from './definitions/definitionBlocks'; | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType'; | ||
import type { NexusObjectTypeConfig, ObjectDefinitionBlock } from './definitions/objectType'; | ||
import type { NexusSchemaExtension } from './extensions'; | ||
import { PrintedGenTyping, PrintedGenTypingImport } from './utils'; | ||
import { NexusFinalArgConfig } from './definitions/args'; | ||
import { UnwrapPromise } from './typeHelpersInternal'; | ||
import type { NexusFinalArgConfig } from './definitions/args'; | ||
import type { UnwrapPromise } from './typeHelpersInternal'; | ||
export { PluginBuilderLens }; | ||
@@ -12,0 +12,0 @@ export declare type CreateFieldResolverInfo<FieldExt = any, TypeExt = any> = { |
import { GraphQLFieldResolver, GraphQLResolveInfo } from 'graphql'; | ||
import { ArgsRecord } from '../definitions/args'; | ||
import { CommonFieldConfig, FieldOutConfig } from '../definitions/definitionBlocks'; | ||
import type { CommonFieldConfig, FieldOutConfig } from '../definitions/definitionBlocks'; | ||
import { NexusNonNullDef } from '../definitions/nonNull'; | ||
@@ -8,4 +8,4 @@ import { NexusNullDef } from '../definitions/nullable'; | ||
import { AllNexusNamedOutputTypeDefs } from '../definitions/wrapping'; | ||
import { NonNullConfig } from '../definitions/_types'; | ||
import { ArgsValue, FieldTypeName, GetGen, MaybePromise, MaybePromiseDeep, ResultValue, SourceValue } from '../typegenTypeHelpers'; | ||
import type { NonNullConfig } from '../definitions/_types'; | ||
import type { ArgsValue, FieldTypeName, GetGen, MaybePromise, MaybePromiseDeep, ResultValue, SourceValue } from '../typegenTypeHelpers'; | ||
export interface ConnectionPluginConfig { | ||
@@ -256,3 +256,3 @@ /** | ||
export declare const ForwardOnlyStrictArgs: { | ||
first: NexusNonNullDef<any> | (import("../definitions/args").NexusArgDef<any> & import("graphql").GraphQLNonNull<any>); | ||
first: NexusNonNullDef<any>; | ||
after: NexusNullDef<any>; | ||
@@ -265,3 +265,3 @@ }; | ||
export declare const BackwardOnlyStrictArgs: { | ||
last: NexusNonNullDef<any> | (import("../definitions/args").NexusArgDef<any> & import("graphql").GraphQLNonNull<any>); | ||
last: NexusNonNullDef<any>; | ||
before: NexusNullDef<any>; | ||
@@ -268,0 +268,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
import { ArgsValue, GetGen, MaybePromise, SourceValue } from '../typegenTypeHelpers'; | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import type { ArgsValue, GetGen, MaybePromise, SourceValue } from '../typegenTypeHelpers'; | ||
export declare type FieldAuthorizeResolver<TypeName extends string, FieldName extends string> = (root: SourceValue<TypeName>, args: ArgsValue<TypeName, FieldName>, context: GetGen<'context'>, info: GraphQLResolveInfo) => MaybePromise<boolean | Error>; | ||
@@ -4,0 +4,0 @@ export interface FieldAuthorizePluginErrorConfig { |
import { GraphQLNullableType, GraphQLResolveInfo } from 'graphql'; | ||
import { GraphQLPossibleOutputs } from '../definitions/_types'; | ||
import { AllOutputTypes, GetGen, GetGen2 } from '../typegenTypeHelpers'; | ||
import type { GraphQLPossibleOutputs } from '../definitions/_types'; | ||
import type { AllOutputTypes, GetGen, GetGen2 } from '../typegenTypeHelpers'; | ||
export interface NullabilityPluginFallbackFn { | ||
@@ -5,0 +5,0 @@ ctx: GetGen<'context'>; |
@@ -1,3 +0,3 @@ | ||
import { GraphQLField } from 'graphql'; | ||
import { ArgsValue, GetGen, SourceValue } from '../core'; | ||
import type { GraphQLField } from 'graphql'; | ||
import type { ArgsValue, GetGen, SourceValue } from '../core'; | ||
export declare type QueryComplexityEstimatorArgs<TypeName extends string, FieldName extends string> = { | ||
@@ -4,0 +4,0 @@ type: SourceValue<TypeName>; |
@@ -1,4 +0,4 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
import { AbstractTypeResolver, GetGen, GetGen2, IsFeatureEnabled2, MaybePromise, SourceValue } from './typegenTypeHelpers'; | ||
import { ConditionalKeys, ConditionalPick, ValueOf } from './typeHelpersInternal'; | ||
import type { GraphQLResolveInfo } from 'graphql'; | ||
import type { AbstractTypeResolver, GetGen, GetGen2, IsFeatureEnabled2, MaybePromise, SourceValue } from './typegenTypeHelpers'; | ||
import type { ConditionalKeys, ConditionalPick, ValueOf } from './typeHelpersInternal'; | ||
/** | ||
@@ -5,0 +5,0 @@ * Returns a union of all the type names of the members of an abstract type |
import { GraphQLNamedType, GraphQLSchema } from 'graphql'; | ||
import { TypegenInfo } from './builder'; | ||
import { TypingImport } from './definitions/_types'; | ||
import type { TypegenInfo } from './builder'; | ||
import type { TypingImport } from './definitions/_types'; | ||
/** Any common types / constants that would otherwise be circular-imported */ | ||
@@ -5,0 +5,0 @@ export declare const SCALAR_TYPES: { |
@@ -166,3 +166,3 @@ "use strict"; | ||
const safeImportPath = importPath.replace(/\\+/g, '/'); | ||
imports.push(`import ${glob ? '* as ' : ''}${alias} from "${safeImportPath}"`); | ||
imports.push(`import type ${glob ? '* as ' : ''}${alias} from "${safeImportPath}"`); | ||
}); | ||
@@ -169,0 +169,0 @@ const typegenInfo = { |
import { GraphQLSchema } from 'graphql'; | ||
import { BuilderConfigInput, TypegenInfo } from './builder'; | ||
import { NexusGraphQLSchema } from './definitions/_types'; | ||
import type { BuilderConfigInput, TypegenInfo } from './builder'; | ||
import type { NexusGraphQLSchema } from './definitions/_types'; | ||
export interface TypegenMetadataConfig extends Omit<BuilderConfigInput, 'outputs' | 'shouldGenerateArtifacts'> { | ||
@@ -5,0 +5,0 @@ nexusSchemaImportId?: string; |
import { GraphQLAbstractType, GraphQLArgument, GraphQLField, GraphQLInputField, GraphQLInputType, GraphQLInterfaceType, GraphQLObjectType, GraphQLOutputType, GraphQLScalarType, GraphQLUnionType } from 'graphql'; | ||
import { TypegenInfo } from './builder'; | ||
import { NexusGraphQLSchema } from './definitions/_types'; | ||
import { StringLike } from './plugin'; | ||
import type { TypegenInfo } from './builder'; | ||
import type { NexusGraphQLSchema } from './definitions/_types'; | ||
import type { StringLike } from './plugin'; | ||
import { GroupedTypes, PrintedGenTypingImport } from './utils'; | ||
@@ -6,0 +6,0 @@ declare type TypeFieldMapping = Record<string, Record<string, [string, string]>>; |
@@ -150,3 +150,3 @@ "use strict"; | ||
utils_1.eachObj(importMap, (val, key) => { | ||
imports.push(`import { ${Array.from(val).join(', ')} } from ${JSON.stringify(key)}`); | ||
imports.push(`import type { ${Array.from(val).join(', ')} } from ${JSON.stringify(key)}`); | ||
}); | ||
@@ -166,3 +166,3 @@ utils_1.eachObj(this.printImports, (val, key) => { | ||
} | ||
imports.push(`import ${idents.join(', ')} from ${JSON.stringify(key)}`); | ||
imports.push(`import type ${idents.join(', ')} from ${JSON.stringify(key)}`); | ||
}); | ||
@@ -169,0 +169,0 @@ return imports.join('\n'); |
@@ -1,4 +0,4 @@ | ||
import { GraphQLAbstractType, GraphQLResolveInfo } from 'graphql'; | ||
import { NexusInterfaceTypeDef } from './definitions/interfaceType'; | ||
import { NexusObjectTypeDef } from './definitions/objectType'; | ||
import type { GraphQLAbstractType, GraphQLResolveInfo } from 'graphql'; | ||
import type { NexusInterfaceTypeDef } from './definitions/interfaceType'; | ||
import type { NexusObjectTypeDef } from './definitions/objectType'; | ||
declare global { | ||
@@ -5,0 +5,0 @@ interface NexusGen { |
@@ -1,4 +0,4 @@ | ||
import { BuilderConfigInput } from './builder'; | ||
import { TypegenMetadataConfig } from './typegenMetadata'; | ||
import type { BuilderConfigInput } from './builder'; | ||
import type { TypegenMetadataConfig } from './typegenMetadata'; | ||
/** Normalizes the builder config into the config we need for typegen */ | ||
export declare function resolveTypegenConfig(config: BuilderConfigInput): TypegenMetadataConfig; |
{ | ||
"name": "nexus", | ||
"version": "1.1.0-next.13", | ||
"version": "1.1.0-next.14", | ||
"description": "Scalable, strongly typed GraphQL schema development", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -45,3 +45,3 @@ import { | ||
} from 'graphql' | ||
import { ArgsRecord, NexusFinalArgConfig } from './definitions/args' | ||
import type { ArgsRecord, NexusFinalArgConfig } from './definitions/args' | ||
import { | ||
@@ -54,6 +54,6 @@ InputDefinitionBlock, | ||
} from './definitions/definitionBlocks' | ||
import { NexusEnumTypeConfig } from './definitions/enumType' | ||
import { NexusExtendInputTypeConfig, NexusExtendInputTypeDef } from './definitions/extendInputType' | ||
import { NexusExtendTypeConfig, NexusExtendTypeDef } from './definitions/extendType' | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType' | ||
import type { NexusEnumTypeConfig } from './definitions/enumType' | ||
import type { NexusExtendInputTypeConfig, NexusExtendInputTypeDef } from './definitions/extendInputType' | ||
import type { NexusExtendTypeConfig, NexusExtendTypeDef } from './definitions/extendType' | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType' | ||
import { | ||
@@ -67,3 +67,3 @@ FieldModificationDef, | ||
import { NexusObjectTypeConfig, NexusObjectTypeDef, ObjectDefinitionBlock } from './definitions/objectType' | ||
import { NexusScalarTypeConfig } from './definitions/scalarType' | ||
import type { NexusScalarTypeConfig } from './definitions/scalarType' | ||
import { NexusUnionTypeConfig, UnionDefinitionBlock, UnionMembers } from './definitions/unionType' | ||
@@ -97,3 +97,3 @@ import { | ||
} from './definitions/wrapping' | ||
import { | ||
import type { | ||
MissingType, | ||
@@ -110,4 +110,4 @@ NexusFeaturesInput, | ||
} from './definitions/_types' | ||
import { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod' | ||
import { DynamicOutputPropertyDef } from './dynamicProperty' | ||
import type { DynamicInputMethodDef, DynamicOutputMethodDef } from './dynamicMethod' | ||
import type { DynamicOutputPropertyDef } from './dynamicProperty' | ||
import { | ||
@@ -131,8 +131,8 @@ NexusFieldExtension, | ||
import { fieldAuthorizePlugin } from './plugins/fieldAuthorizePlugin' | ||
import { SourceTypesConfigOptions } from './typegenAutoConfig' | ||
import { TypegenFormatFn } from './typegenFormatPrettier' | ||
import type { SourceTypesConfigOptions } from './typegenAutoConfig' | ||
import type { TypegenFormatFn } from './typegenFormatPrettier' | ||
import { TypegenMetadata } from './typegenMetadata' | ||
import { AbstractTypeResolver, GetGen } from './typegenTypeHelpers' | ||
import type { AbstractTypeResolver, GetGen } from './typegenTypeHelpers' | ||
import { resolveTypegenConfig } from './typegenUtils' | ||
import { RequiredDeeply } from './typeHelpersInternal' | ||
import type { RequiredDeeply } from './typeHelpersInternal' | ||
import { | ||
@@ -139,0 +139,0 @@ assertNoMissingTypes, |
@@ -1,2 +0,2 @@ | ||
import { | ||
import type { | ||
GraphQLCompositeType, | ||
@@ -16,3 +16,3 @@ GraphQLEnumType, | ||
} from 'graphql' | ||
import { | ||
import type { | ||
NexusFieldExtension, | ||
@@ -24,6 +24,6 @@ NexusInputObjectTypeExtension, | ||
} from '../extensions' | ||
import * as AbstractTypes from '../typegenAbstractTypes' | ||
import { RequiredDeeply } from '../typeHelpersInternal' | ||
import type * as AbstractTypes from '../typegenAbstractTypes' | ||
import type { RequiredDeeply } from '../typeHelpersInternal' | ||
export { AbstractTypes } | ||
export type { AbstractTypes } | ||
@@ -30,0 +30,0 @@ export type Maybe<T> = T | null |
@@ -1,4 +0,4 @@ | ||
import { GraphQLScalarTypeConfig } from 'graphql' | ||
import { AllInputTypes, GetGen2 } from '../typegenTypeHelpers' | ||
import { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping' | ||
import type { GraphQLScalarTypeConfig } from 'graphql' | ||
import type { AllInputTypes, GetGen2 } from '../typegenTypeHelpers' | ||
import type { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping' | ||
import { NexusTypes, withNexusSymbol } from './_types' | ||
@@ -5,0 +5,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { GraphQLNamedType } from 'graphql' | ||
import { SourceTypingDef } from './_types' | ||
import type { GraphQLNamedType } from 'graphql' | ||
import type { SourceTypingDef } from './_types' | ||
@@ -4,0 +4,0 @@ export interface TypeExtensionConfig { |
@@ -1,7 +0,14 @@ | ||
import { GraphQLFieldConfig, GraphQLFieldResolver, GraphQLInputFieldConfig } from 'graphql' | ||
import type { GraphQLFieldConfig, GraphQLFieldResolver, GraphQLInputFieldConfig } from 'graphql' | ||
import { messages } from '../messages' | ||
import { AllInputTypes, FieldResolver, GetGen, GetGen3, HasGen3, NeedsResolver } from '../typegenTypeHelpers' | ||
import { ArgsRecord } from './args' | ||
import { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping' | ||
import { BaseScalars } from './_types' | ||
import type { | ||
AllInputTypes, | ||
FieldResolver, | ||
GetGen, | ||
GetGen3, | ||
HasGen3, | ||
NeedsResolver, | ||
} from '../typegenTypeHelpers' | ||
import type { ArgsRecord } from './args' | ||
import type { AllNexusInputTypeDefs, AllNexusOutputTypeDefs, NexusWrapKind } from './wrapping' | ||
import type { BaseScalars } from './_types' | ||
@@ -8,0 +15,0 @@ export interface CommonFieldConfig { |
import { assertValidName } from 'graphql' | ||
import { GetGen } from '../typegenTypeHelpers' | ||
import { InputDefinitionBlock } from './definitionBlocks' | ||
import type { GetGen } from '../typegenTypeHelpers' | ||
import type { InputDefinitionBlock } from './definitionBlocks' | ||
import { NexusTypes, withNexusSymbol } from './_types' | ||
@@ -5,0 +5,0 @@ |
import { assertValidName } from 'graphql' | ||
import { AllOutputTypesPossible } from '../typegenTypeHelpers' | ||
import { ObjectDefinitionBlock } from './objectType' | ||
import { IsSubscriptionType, SubscriptionBuilder } from './subscriptionType' | ||
import type { AllOutputTypesPossible } from '../typegenTypeHelpers' | ||
import type { ObjectDefinitionBlock } from './objectType' | ||
import type { IsSubscriptionType, SubscriptionBuilder } from './subscriptionType' | ||
import { NexusTypes, withNexusSymbol } from './_types' | ||
@@ -6,0 +6,0 @@ |
import { assertValidName, GraphQLInputObjectTypeConfig } from 'graphql' | ||
import { arg, NexusArgDef, NexusAsArgConfig } from './args' | ||
import { InputDefinitionBlock } from './definitionBlocks' | ||
import type { InputDefinitionBlock } from './definitionBlocks' | ||
import { NexusTypes, NonNullConfig, withNexusSymbol } from './_types' | ||
@@ -5,0 +5,0 @@ |
import { assertValidName, GraphQLInterfaceTypeConfig } from 'graphql' | ||
import { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers' | ||
import { ArgsRecord } from './args' | ||
import type { FieldResolver, GetGen, InterfaceFieldsFor, ModificationType } from '../typegenTypeHelpers' | ||
import type { ArgsRecord } from './args' | ||
import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks' | ||
@@ -5,0 +5,0 @@ import { AbstractTypes, NexusTypes, NonNullConfig, SourceTypingDef, withNexusSymbol } from './_types' |
@@ -1,2 +0,2 @@ | ||
import { FieldOutConfig, OutputDefinitionBlock } from '../core' | ||
import type { FieldOutConfig, OutputDefinitionBlock } from '../core' | ||
import { extendType, NexusExtendTypeDef } from './extendType' | ||
@@ -3,0 +3,0 @@ |
@@ -70,3 +70,17 @@ import { isNonNullType, isType } from 'graphql' | ||
if (isNexusNonNullTypeDef(type) || isNonNullType(type)) { | ||
return type | ||
/* | ||
Ran into an issue around the generated return type for `nonNull()`, | ||
which produces: | ||
```ts | ||
NexusNonNullDef<any> | (TypeName & GraphQLNonNull<any>) | ||
``` | ||
This is problematic when you reach a decent amount of types, where you'll | ||
hit a `union type that is too complex to represent` error. Removing the | ||
right hand side of the clause resolves the issue, and the fact that it's a | ||
`GraphQLNonNull` type is irrelevant, so we can just cast it to | ||
`NexusNonNullDef<any>` here | ||
*/ | ||
return type as NexusNonNullDef<any> | ||
} | ||
@@ -73,0 +87,0 @@ if (isNexusNullTypeDef(type)) { |
import { assertValidName, GraphQLObjectType } from 'graphql' | ||
import { InterfaceFieldsFor } from '../typegenTypeHelpers' | ||
import type { InterfaceFieldsFor } from '../typegenTypeHelpers' | ||
import { OutputDefinitionBlock, OutputDefinitionBuilder } from './definitionBlocks' | ||
import { FieldModification, FieldModificationDef, Implemented } from './interfaceType' | ||
import type { FieldModification, FieldModificationDef, Implemented } from './interfaceType' | ||
import { AbstractTypes, NexusTypes, NonNullConfig, SourceTypingDef, withNexusSymbol } from './_types' | ||
@@ -6,0 +6,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { FieldOutConfig, OutputDefinitionBlock } from '../core' | ||
import type { FieldOutConfig, OutputDefinitionBlock } from '../core' | ||
import { extendType, NexusExtendTypeDef } from './extendType' | ||
@@ -3,0 +3,0 @@ |
import { extendType, NexusExtendTypeDef } from './extendType' | ||
import { SubscriptionBuilder, SubscriptionTypeConfig } from './subscriptionType' | ||
import type { SubscriptionBuilder, SubscriptionTypeConfig } from './subscriptionType' | ||
@@ -4,0 +4,0 @@ export type SubscriptionFieldConfig<FieldName extends string, Event> = |
@@ -1,7 +0,7 @@ | ||
import { GraphQLResolveInfo } from 'graphql' | ||
import { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue } from '../typegenTypeHelpers' | ||
import { IsEqual } from '../typeHelpersInternal' | ||
import { CommonOutputFieldConfig } from './definitionBlocks' | ||
import type { GraphQLResolveInfo } from 'graphql' | ||
import type { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue } from '../typegenTypeHelpers' | ||
import type { IsEqual } from '../typeHelpersInternal' | ||
import type { CommonOutputFieldConfig } from './definitionBlocks' | ||
import { objectType } from './objectType' | ||
import { AllNexusOutputTypeDefs } from './wrapping' | ||
import type { AllNexusOutputTypeDefs } from './wrapping' | ||
@@ -8,0 +8,0 @@ export type IsSubscriptionType<T> = IsEqual<T, 'Subscription'> |
import { assertValidName, GraphQLUnionTypeConfig } from 'graphql' | ||
import { GetGen } from '../typegenTypeHelpers' | ||
import { NexusObjectTypeDef } from './objectType' | ||
import type { GetGen } from '../typegenTypeHelpers' | ||
import type { NexusObjectTypeDef } from './objectType' | ||
import { AbstractTypes, NexusTypes, SourceTypingDef, withNexusSymbol } from './_types' | ||
@@ -5,0 +5,0 @@ |
@@ -11,19 +11,19 @@ import { | ||
} from 'graphql' | ||
import { DynamicInputMethodDef, DynamicOutputMethodDef } from '../dynamicMethod' | ||
import { DynamicOutputPropertyDef } from '../dynamicProperty' | ||
import { NexusPlugin } from '../plugin' | ||
import { AllInputTypes, GetGen } from '../typegenTypeHelpers' | ||
import type { DynamicInputMethodDef, DynamicOutputMethodDef } from '../dynamicMethod' | ||
import type { DynamicOutputPropertyDef } from '../dynamicProperty' | ||
import type { NexusPlugin } from '../plugin' | ||
import type { AllInputTypes, GetGen } from '../typegenTypeHelpers' | ||
import { PrintedGenTyping, PrintedGenTypingImport, Unreachable } from '../utils' | ||
import { NexusArgDef, arg } from './args' | ||
import { NexusEnumTypeDef } from './enumType' | ||
import { NexusExtendInputTypeDef } from './extendInputType' | ||
import { NexusExtendTypeDef } from './extendType' | ||
import { NexusInputObjectTypeDef } from './inputObjectType' | ||
import { NexusInterfaceTypeDef } from './interfaceType' | ||
import type { NexusEnumTypeDef } from './enumType' | ||
import type { NexusExtendInputTypeDef } from './extendInputType' | ||
import type { NexusExtendTypeDef } from './extendType' | ||
import type { NexusInputObjectTypeDef } from './inputObjectType' | ||
import type { NexusInterfaceTypeDef } from './interfaceType' | ||
import { list, NexusListDef } from './list' | ||
import { NexusNonNullDef, nonNull } from './nonNull' | ||
import { NexusNullDef, nullable } from './nullable' | ||
import { NexusObjectTypeDef } from './objectType' | ||
import { NexusScalarTypeDef } from './scalarType' | ||
import { NexusUnionTypeDef } from './unionType' | ||
import type { NexusObjectTypeDef } from './objectType' | ||
import type { NexusScalarTypeDef } from './scalarType' | ||
import type { NexusUnionTypeDef } from './unionType' | ||
import { NexusTypes, NexusWrappedSymbol } from './_types' | ||
@@ -30,0 +30,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { PluginBuilderLens } from './builder' | ||
import { InputDefinitionBlock, OutputDefinitionBlock } from './definitions/definitionBlocks' | ||
import type { PluginBuilderLens } from './builder' | ||
import type { InputDefinitionBlock, OutputDefinitionBlock } from './definitions/definitionBlocks' | ||
import { NexusTypes, withNexusSymbol } from './definitions/_types' | ||
import { NexusWrapKind } from './definitions/wrapping' | ||
import type { NexusWrapKind } from './definitions/wrapping' | ||
@@ -6,0 +6,0 @@ export type OutputFactoryConfig<T> = { |
@@ -1,5 +0,5 @@ | ||
import { SchemaBuilder } from './builder' | ||
import { OutputDefinitionBlock } from './definitions/definitionBlocks' | ||
import type { SchemaBuilder } from './builder' | ||
import type { OutputDefinitionBlock } from './definitions/definitionBlocks' | ||
import { NexusTypes, withNexusSymbol } from './definitions/_types' | ||
import { BaseExtensionConfig } from './dynamicMethod' | ||
import type { BaseExtensionConfig } from './dynamicMethod' | ||
@@ -6,0 +6,0 @@ export type OutputPropertyFactoryConfig<T> = { |
import { defaultFieldResolver, GraphQLNamedType } from 'graphql' | ||
import { DynamicFieldDefs, SchemaConfig } from './builder' | ||
import { SourceTypingDef, SourceTypings } from './definitions/_types' | ||
import { NexusOutputFieldConfig } from './definitions/definitionBlocks' | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType' | ||
import { NexusInterfaceTypeConfig } from './definitions/interfaceType' | ||
import { NexusObjectTypeConfig } from './definitions/objectType' | ||
import type { DynamicFieldDefs, SchemaConfig } from './builder' | ||
import type { SourceTypingDef, SourceTypings } from './definitions/_types' | ||
import type { NexusOutputFieldConfig } from './definitions/definitionBlocks' | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType' | ||
import type { NexusInterfaceTypeConfig } from './definitions/interfaceType' | ||
import type { NexusObjectTypeConfig } from './definitions/objectType' | ||
@@ -9,0 +9,0 @@ export type NexusGraphQLNamedType = GraphQLNamedType & { |
@@ -1,3 +0,3 @@ | ||
import { GraphQLFieldResolver, GraphQLInterfaceType, GraphQLResolveInfo, GraphQLSchema } from 'graphql' | ||
import { PluginBuilderLens, SchemaConfig } from './builder' | ||
import type { GraphQLFieldResolver, GraphQLInterfaceType, GraphQLResolveInfo, GraphQLSchema } from 'graphql' | ||
import type { PluginBuilderLens, SchemaConfig } from './builder' | ||
import { | ||
@@ -12,9 +12,13 @@ Maybe, | ||
} from './definitions/_types' | ||
import { InputDefinitionBlock, NexusOutputFieldDef, NexusInputFieldDef } from './definitions/definitionBlocks' | ||
import { NexusInputObjectTypeConfig } from './definitions/inputObjectType' | ||
import { NexusObjectTypeConfig, ObjectDefinitionBlock } from './definitions/objectType' | ||
import { NexusSchemaExtension } from './extensions' | ||
import type { | ||
InputDefinitionBlock, | ||
NexusOutputFieldDef, | ||
NexusInputFieldDef, | ||
} from './definitions/definitionBlocks' | ||
import type { NexusInputObjectTypeConfig } from './definitions/inputObjectType' | ||
import type { NexusObjectTypeConfig, ObjectDefinitionBlock } from './definitions/objectType' | ||
import type { NexusSchemaExtension } from './extensions' | ||
import { isPromiseLike, PrintedGenTyping, PrintedGenTypingImport, venn } from './utils' | ||
import { NexusFinalArgConfig } from './definitions/args' | ||
import { UnwrapPromise } from './typeHelpersInternal' | ||
import type { NexusFinalArgConfig } from './definitions/args' | ||
import type { UnwrapPromise } from './typeHelpersInternal' | ||
@@ -21,0 +25,0 @@ export { PluginBuilderLens } |
import { defaultFieldResolver, GraphQLFieldResolver, GraphQLResolveInfo } from 'graphql' | ||
import { ArgsRecord, intArg, stringArg } from '../definitions/args' | ||
import { CommonFieldConfig, FieldOutConfig } from '../definitions/definitionBlocks' | ||
import type { CommonFieldConfig, FieldOutConfig } from '../definitions/definitionBlocks' | ||
import { NexusNonNullDef, nonNull } from '../definitions/nonNull' | ||
@@ -12,6 +12,6 @@ import { NexusNullDef, nullable } from '../definitions/nullable' | ||
} from '../definitions/wrapping' | ||
import { NonNullConfig } from '../definitions/_types' | ||
import type { NonNullConfig } from '../definitions/_types' | ||
import { dynamicOutputMethod } from '../dynamicMethod' | ||
import { completeValue, plugin } from '../plugin' | ||
import { | ||
import type { | ||
ArgsValue, | ||
@@ -25,3 +25,3 @@ FieldTypeName, | ||
} from '../typegenTypeHelpers' | ||
import { MaybePromiseLike } from '../typeHelpersInternal' | ||
import type { MaybePromiseLike } from '../typeHelpersInternal' | ||
import { eachObj, getOwnPackage, isPromiseLike, mapObj, pathToArray, printedGenTypingImport } from '../utils' | ||
@@ -28,0 +28,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { NexusFinalArgConfig } from '../definitions/args' | ||
import { NexusInputFieldDef, NexusOutputFieldDef } from '../definitions/definitionBlocks' | ||
import type { NexusFinalArgConfig } from '../definitions/args' | ||
import type { NexusInputFieldDef, NexusOutputFieldDef } from '../definitions/definitionBlocks' | ||
import { list } from '../definitions/list' | ||
@@ -4,0 +4,0 @@ import { nonNull } from '../definitions/nonNull' |
@@ -1,4 +0,4 @@ | ||
import { GraphQLResolveInfo } from 'graphql' | ||
import type { GraphQLResolveInfo } from 'graphql' | ||
import { plugin } from '../plugin' | ||
import { ArgsValue, GetGen, MaybePromise, SourceValue } from '../typegenTypeHelpers' | ||
import type { ArgsValue, GetGen, MaybePromise, SourceValue } from '../typegenTypeHelpers' | ||
import { printedGenTyping, printedGenTypingImport } from '../utils' | ||
@@ -5,0 +5,0 @@ |
@@ -15,6 +15,6 @@ import { | ||
import { forEach } from 'iterall' | ||
import { GraphQLPossibleOutputs } from '../definitions/_types' | ||
import { NexusGraphQLNamedType } from '../extensions' | ||
import type { GraphQLPossibleOutputs } from '../definitions/_types' | ||
import type { NexusGraphQLNamedType } from '../extensions' | ||
import { CreateFieldResolverInfo, plugin } from '../plugin' | ||
import { AllOutputTypes, GetGen, GetGen2 } from '../typegenTypeHelpers' | ||
import type { AllOutputTypes, GetGen, GetGen2 } from '../typegenTypeHelpers' | ||
import { isPromiseLike, printedGenTyping } from '../utils' | ||
@@ -21,0 +21,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { GraphQLField } from 'graphql' | ||
import { ArgsValue, GetGen, SourceValue } from '../core' | ||
import type { GraphQLField } from 'graphql' | ||
import type { ArgsValue, GetGen, SourceValue } from '../core' | ||
import { plugin } from '../plugin' | ||
@@ -4,0 +4,0 @@ import { printedGenTyping, printedGenTypingImport } from '../utils' |
@@ -1,3 +0,3 @@ | ||
import { GraphQLResolveInfo } from 'graphql' | ||
import { | ||
import type { GraphQLResolveInfo } from 'graphql' | ||
import type { | ||
AbstractTypeResolver, | ||
@@ -10,3 +10,3 @@ GetGen, | ||
} from './typegenTypeHelpers' | ||
import { ConditionalKeys, ConditionalPick, ValueOf } from './typeHelpersInternal' | ||
import type { ConditionalKeys, ConditionalPick, ValueOf } from './typeHelpersInternal' | ||
@@ -13,0 +13,0 @@ /** |
import { GraphQLNamedType, GraphQLSchema, isOutputType } from 'graphql' | ||
import * as path from 'path' | ||
import { TypegenInfo } from './builder' | ||
import { TypingImport } from './definitions/_types' | ||
import type { TypegenInfo } from './builder' | ||
import type { TypingImport } from './definitions/_types' | ||
import { TYPEGEN_HEADER } from './lang' | ||
@@ -264,3 +264,3 @@ import { getOwnPackage, log, objValues, relativePathTo, typeScriptFileExtension } from './utils' | ||
const safeImportPath = importPath.replace(/\\+/g, '/') | ||
imports.push(`import ${glob ? '* as ' : ''}${alias} from "${safeImportPath}"`) | ||
imports.push(`import type ${glob ? '* as ' : ''}${alias} from "${safeImportPath}"`) | ||
}) | ||
@@ -267,0 +267,0 @@ |
import { GraphQLSchema, lexicographicSortSchema, printSchema } from 'graphql' | ||
import * as path from 'path' | ||
import { BuilderConfigInput, TypegenInfo } from './builder' | ||
import { NexusGraphQLSchema } from './definitions/_types' | ||
import type { BuilderConfigInput, TypegenInfo } from './builder' | ||
import type { NexusGraphQLSchema } from './definitions/_types' | ||
import { SDL_HEADER, TYPEGEN_HEADER } from './lang' | ||
@@ -6,0 +6,0 @@ import { typegenAutoConfig } from './typegenAutoConfig' |
@@ -24,6 +24,6 @@ import { | ||
} from 'graphql' | ||
import { TypegenInfo } from './builder' | ||
import type { TypegenInfo } from './builder' | ||
import { isNexusPrintedGenTyping, isNexusPrintedGenTypingImport } from './definitions/wrapping' | ||
import { NexusGraphQLSchema } from './definitions/_types' | ||
import { StringLike } from './plugin' | ||
import type { NexusGraphQLSchema } from './definitions/_types' | ||
import type { StringLike } from './plugin' | ||
import { | ||
@@ -202,3 +202,3 @@ eachObj, | ||
eachObj(importMap, (val, key) => { | ||
imports.push(`import { ${Array.from(val).join(', ')} } from ${JSON.stringify(key)}`) | ||
imports.push(`import type { ${Array.from(val).join(', ')} } from ${JSON.stringify(key)}`) | ||
}) | ||
@@ -218,3 +218,3 @@ eachObj(this.printImports, (val, key) => { | ||
} | ||
imports.push(`import ${idents.join(', ')} from ${JSON.stringify(key)}`) | ||
imports.push(`import type ${idents.join(', ')} from ${JSON.stringify(key)}`) | ||
}) | ||
@@ -221,0 +221,0 @@ return imports.join('\n') |
import { expectAssignable } from 'tsd' | ||
import { MaybePromiseDeep } from './typegenTypeHelpers' | ||
import type { MaybePromiseDeep } from './typegenTypeHelpers' | ||
@@ -4,0 +4,0 @@ /** MaybePromiseDeep */ |
@@ -1,4 +0,4 @@ | ||
import { GraphQLAbstractType, GraphQLResolveInfo } from 'graphql' | ||
import { NexusInterfaceTypeDef } from './definitions/interfaceType' | ||
import { NexusObjectTypeDef } from './definitions/objectType' | ||
import type { GraphQLAbstractType, GraphQLResolveInfo } from 'graphql' | ||
import type { NexusInterfaceTypeDef } from './definitions/interfaceType' | ||
import type { NexusObjectTypeDef } from './definitions/objectType' | ||
@@ -5,0 +5,0 @@ declare global { |
import * as path from 'path' | ||
import { BuilderConfigInput } from './builder' | ||
import { TypegenMetadataConfig } from './typegenMetadata' | ||
import type { BuilderConfigInput } from './builder' | ||
import type { TypegenMetadataConfig } from './typegenMetadata' | ||
import { assertAbsolutePath, getOwnPackage, isProductionStage } from './utils' | ||
@@ -5,0 +5,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
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
2057550
32240