Skip to content

Commit

Permalink
Use nullable type. Fixes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
mpowaga committed May 21, 2016
1 parent ee43909 commit 3c76cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function addMockFunctionsToSchema({ schema, mocks = {}, preserveResolvers = fals
}

if (fieldType instanceof GraphQLList) {
return [mockType(type.ofType)(o, a, c, r), mockType(type.ofType)(o, a, c, r)];
return [mockType(fieldType.ofType)(o, a, c, r), mockType(fieldType.ofType)(o, a, c, r)];
}
if (mockFunctionMap.has(fieldType.name)) {
// the object passed doesn't have this field, so we apply the default mock
Expand Down

0 comments on commit 3c76cf9

Please sign in to comment.