graphql-mocks
Version:
Tools for setting up graphql test resolvers
12 lines (9 loc) • 323 B
JavaScript
import { isListType, isNonNullType } from 'graphql';
/**
* Checks if a type is a list type or a wrapped list type (ie: wrapped with non-null)
*/
function hasListType(type) {
return isListType(type) || isNonNullType(type) && isListType(type.ofType);
}
export { hasListType };
//# sourceMappingURL=has-list-type.js.map