UNPKG

@apollo/client

Version:

A fully-featured caching GraphQL client.

18 lines (17 loc) 512 B
import { Kind } from "graphql"; /** * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ export function getUnwrappedType(node) { switch (node.kind) { case Kind.NAMED_TYPE: return node.name.value; case Kind.LIST_TYPE: return getUnwrappedType(node.type); case Kind.NON_NULL_TYPE: return getUnwrappedType(node.type); } } //# sourceMappingURL=getUnwrappedType.js.map