Skip to content

Commit

Permalink
fix: list def typing (#77)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Kuhrt <jasonkuhrt@me.com>
  • Loading branch information
haleksandre and jasonkuhrt authored Jun 22, 2021
1 parent 4aaab0e commit 72cc944
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/generator/models/declaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ function renderNexusType2(field: DMMF.Field, settings: Gentime.Settings): string

if (field.isList && field.isRequired) {
return dedent`
NexusCore.ListDef<${graphqlType}> | NexusCore.NexusNonNullDef<${graphqlType}>
NexusCore.NexusListDef<${graphqlType}> | NexusCore.NexusNonNullDef<${graphqlType}>
`
} else if (field.isList && !field.isRequired) {
return dedent`
NexusCore.ListDef<${graphqlType}> | NexusCore.NexusNullDef<${graphqlType}>
NexusCore.NexusListDef<${graphqlType}> | NexusCore.NexusNullDef<${graphqlType}>
`
} else if (field.isRequired) {
return dedent`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ declare namespace $Types {
/**
* The type of this field.
*/
type: NexusCore.ListDef<Post> | NexusCore.NexusNonNullDef<Post>
type: NexusCore.NexusListDef<Post> | NexusCore.NexusNonNullDef<Post>
/**
* The documentation of this field.
Expand Down

0 comments on commit 72cc944

Please sign in to comment.