UNPKG

graphql-mocks

Version:

Tools for setting up graphql test resolvers

11 lines (9 loc) 323 B
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.mjs.map