Skip to content

Commit

Permalink
Merge pull request #90 from sverps/master
Browse files Browse the repository at this point in the history
fix(scalar): default 'type' to array when 'items' is defined on a schema
  • Loading branch information
anymaniax authored Jul 31, 2020
2 parents 84c359b + 113cf10 commit 6bdb19c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/getters/scalar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import { getObject } from './object';
export const getScalar = (item: SchemaObject, name?: string): ResolverValue => {
const nullable = item.nullable ? ' | null' : '';

if (!item.type && item.items) {
item.type = 'array';
}

switch (item.type) {
case 'int32':
case 'int64':
Expand Down

0 comments on commit 6bdb19c

Please sign in to comment.