Skip to content

Commit

Permalink
Properly append array syntax (#747)
Browse files Browse the repository at this point in the history
* Properly append array syntax

Closes #740 
Closes #741

* Test updates

Co-authored-by: Rob Cameron <[email protected]>
  • Loading branch information
cannikin and cannikin authored Jun 24, 2020
1 parent 5e51421 commit c8ee1d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const schema = gql`
name: String
email: String!
isAdmin: Boolean!
profiles: UserProfile
profiles: UserProfile[]
}
type Query {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const schema = gql`
name: String
email: String!
isAdmin: Boolean!
profiles: UserProfile
profiles: UserProfile[]
}
type Query {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/generate/sdl/sdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const modelFieldToSDL = (field, required = true, types = {}) => {
field.type =
field.kind === 'object' ? idType(types[field.type]) : field.type
}
return `${field.name}: ${field.type}${
return `${field.name}: ${field.type}${field.isList ? '[]' : ''}${
field.isRequired && required ? '!' : ''
}`
}
Expand Down

0 comments on commit c8ee1d5

Please sign in to comment.