UNPKG

@apollo/client

Version:

A fully-featured caching GraphQL client.

21 lines (20 loc) 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getUnwrappedType = getUnwrappedType; const graphql_1 = require("graphql"); /** * @internal * * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time. */ function getUnwrappedType(node) { switch (node.kind) { case graphql_1.Kind.NAMED_TYPE: return node.name.value; case graphql_1.Kind.LIST_TYPE: return getUnwrappedType(node.type); case graphql_1.Kind.NON_NULL_TYPE: return getUnwrappedType(node.type); } } //# sourceMappingURL=getUnwrappedType.cjs.map