graphql-mocks
Version:
Tools for setting up graphql test resolvers
13 lines (10 loc) • 353 B
JavaScript
var graphql = require('graphql');
/**
* Checks if a type is a list type or a wrapped list type (ie: wrapped with non-null)
*/
function hasListType(type) {
return graphql.isListType(type) || graphql.isNonNullType(type) && graphql.isListType(type.ofType);
}
exports.hasListType = hasListType;
//# sourceMappingURL=has-list-type.js.map
;