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
5.4 KiB

4 months ago
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/subscriptions/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,0CAA0C;AAC1C,EAAE;AACF,+EAA+E;AAC/E,0CAA0C;AAC1C,EAAE;AACF,2CAA2C;AAC3C,EAAE;AACF,wBAAwB;AACxB,EAAE;AACF,yCAAyC;AACzC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,6EAA6E;AAC7E,sDAAsD;AACtD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,4EAA4E;AAC5E,gBAAgB;;AAEhB,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAIjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,yEAAyE;AACzE,SAAS,gBAAgB,CAAC,GAAY;IACpC,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,QAAQ,IAAI,GAAG,CAAC;AAClE,CAAC;AAED,yEAAyE;AACzE,SAAS,gBAAgB,CAAC,GAAY;;IACpC,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAA,MAAA,GAAG,CAAC,MAAM,0CAAE,UAAU,MAAK,SAAS,CAAC,MAAM,CAAC;AAC7E,CAAC;AAED;IAAmC,iCAAU;IAC3C,uBAA4B,MAAc;QACxC,YAAA,MAAK,WAAE,SAAC;QADkB,YAAM,GAAN,MAAM,CAAQ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["// This file is adapted from the graphql-ws npm package:\n// https://github.com/enisdenjo/graphql-ws\n//\n// Most of the file comes from that package's README; some other parts (such as\n// isLikeCloseEvent) come from its source.\n//\n// Here's the license of the original code:\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2020-2021 Denis Badurina\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport { print } from \"../../utilities/index.js\";\nimport type { Client } from \"graphql-ws\";\n\nimport type { Operation, FetchResult } from \"../core/index.js\";\nimport { ApolloLink } from \"../core/index.js\";\nimport { isNonNullObject, Observable } from \"../../utilities/index.js\";\nimport { ApolloError } from \"../../errors/index.js\";\n\n// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close_event\nfunction isLikeCloseEvent(val: unknown): val is CloseEvent {\n return isNonNullObject(val) && \"code\" in val && \"reason\" in val;\n}\n\