graphql-paper
Version:
A flexible in-memory store based on a GraphQL Schema
15 lines (13 loc) • 368 B
JavaScript
import { isListType, isNonNullType } from 'graphql';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function extractListType(type) {
if (isListType(type)) {
return type;
}
if (isNonNullType(type)) {
return extractListType(type.ofType);
}
return undefined;
}
export { extractListType };
//# sourceMappingURL=extract-list-type.mjs.map