UNPKG

@apollo/client

Version:

A fully-featured caching GraphQL client.

20 lines (19 loc) 654 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getDirectiveArgValue = getDirectiveArgValue; 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 getDirectiveArgValue(directive, name, kind) { const arg = directive.arguments?.find((arg) => arg.name.value === name); if (!arg || arg.value.kind !== kind) return; switch (arg.value.kind) { case graphql_1.Kind.STRING: return arg.value.value; } } //# sourceMappingURL=getDirectiveArgValue.cjs.map