Odoo GraphQL Subscription using Node, Express JS for Sample
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
161 KiB

4 months ago
{"version":3,"file":"utilities.cjs","sources":["graphql/directives.js","common/canUse.js","common/objects.js","graphql/fragments.js","caching/caches.js","caching/sizes.js","caching/getMemoryInternals.js","common/canonicalStringify.js","graphql/storeUtils.js","graphql/getFromAST.js","graphql/DocumentTransform.js","graphql/print.js","common/arrays.js","graphql/transform.js","graphql/operations.js","common/mergeDeep.js","policies/pagination.js","promises/decoration.js","common/cloneDeep.js","common/maybeDeepFreeze.js","observables/iteration.js","observables/asyncMap.js","observables/subclassing.js","observables/Concast.js","common/incrementalResult.js","common/errorHandling.js","common/compact.js","common/makeUniqueId.js","common/stringifyForDisplay.js","common/mergeOptions.js","common/omitDeep.js","common/stripTypename.js"],"sourcesContent":["import { invariant } from \"../globals/index.js\";\nimport { visit, BREAK } from \"graphql\";\nexport function shouldInclude(_a, variables) {\n var directives = _a.directives;\n if (!directives || !directives.length) {\n return true;\n }\n return getInclusionDirectives(directives).every(function (_a) {\n var directive = _a.directive, ifArgument = _a.ifArgument;\n var evaledValue = false;\n if (ifArgument.value.kind === \"Variable\") {\n evaledValue =\n variables && variables[ifArgument.value.name.value];\n invariant(evaledValue !== void 0, 67, directive.name.value);\n }\n else {\n evaledValue = ifArgument.value.value;\n }\n return directive.name.value === \"skip\" ? !evaledValue : evaledValue;\n });\n}\nexport function getDirectiveNames(root) {\n var names = [];\n visit(root, {\n Directive: function (node) {\n names.push(node.name.value);\n },\n });\n return names;\n}\nexport var hasAnyDirectives = function (names, root) {\n return hasDirectives(names, root, false);\n};\nexport var hasAllDirectives = function (names, root) {\n return hasDirectives(names, root, true);\n};\nexport function hasDirectives(names, root, all) {\n var nameSet = new Set(names);\n var uniqueCount = nameSet.size;\n visit(root, {\n Directive: function (node) {\n if (nameSet.delete(node.name.value) && (!all || !nameSet.size)) {\n return BREAK;\n }\n },\n });\n // If we found all the names, nameSet will be empty. If we only care about\n // finding some of them, the < condition is sufficient.\n return all ? !nameSet.size : nameSet.size < uniqueCount;\n}\nexport function hasClientExports(document) {\n return document && hasDirectives([\"client\", \"export\"], document, true);\n}\nfunction isInclusionDirective(_a) {\n var value = _a.name.value;\n return value === \"skip\" || value === \"include\";\n}\nexport function getInclusionDirectives(directives) {\n var result = [];\n if (directives && directives.length) {\n directives.forEach(function (directive) {\n if (!isInclusionDirective(directive))\n return;\n var directiveArguments = directive.arguments;\n var directiveName = directive.name.value;\n invariant(directiveArguments && directiveArguments.length === 1, 68, directiveName);\n var ifArgument = directiveArguments[0];\n invariant(ifArgument.name && ifArgument.name.value === \"if\", 69, directiveName);\n var ifValue = ifArgument.value;\n // means it has to be a variable value if this is a valid @skip or @include directive\n invariant(ifValue &&\n (ifValue.kind === \"Variable\" || ifValue.kind === \"BooleanValue\"), 70, directiveName);\n result.push({ directive: directive, ifArgument: ifArgument });\n });\n }\n return result;\n}\n//# sourceMappingURL=directives.js.map","import { maybe } from \"../globals/index.js\";\nexport var canUseWeakMap = typeof WeakMap === \"function\" &&\n !maybe(function () { return navi