Skip to content

Commit

Permalink
fix(exists): Fixes unintentional exists error messages
Browse files Browse the repository at this point in the history
Fixes #254
  • Loading branch information
maticzav committed Nov 18, 2018
1 parent 05ccb4a commit 555d29c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function buildExistsInfo(
const type = queryType.getFields()[rootFieldName].type

// make sure that just list types are queried
if (!isNonNullType(type) || !isListType(type)) {
if (!isNonNullType(type) || !isListType(type.ofType)) {
throw new Error(`Invalid exist query: ${rootFieldName}`)
}

Expand Down

0 comments on commit 555d29c

Please sign in to comment.