File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/apollo-link-ws/lib/bundle.umd.js.map
{"version":3,"file":"bundle.umd.js","sources":["../src/webSocketLink.ts"],"sourcesContent":["import { ApolloLink, Operation, FetchResult, Observable } from 'apollo-link';\n\nimport { SubscriptionClient, ClientOptions } from 'subscriptions-transport-ws';\n\nexport namespace WebSocketLink {\n /**\n * Configuration to use when constructing the subscription client (subscriptions-transport-ws).\n */\n export interface Configuration {\n /**\n * The endpoint to connect to.\n */\n uri: string;\n\n /**\n * Options to pass when constructing the subscription client.\n */\n options?: ClientOptions;\n\n /**\n * A custom WebSocket implementation to use.\n */\n webSocketImpl?: any;\n }\n}\n\n// For backwards compatibility.\nexport import WebSocketParams = WebSocketLink.Configuration;\n\nexport class WebSocketLink extends ApolloLink {\n private subscriptionClient: SubscriptionClient;\n\n constructor(\n paramsOrClient: WebSocketLink.Configuration | SubscriptionClient,\n ) {\n super();\n\n if (paramsOrClient instanceof SubscriptionClient) {\n this.subscriptionClient = paramsOrClient;\n } else {\n this.subscriptionClient = new SubscriptionClient(\n paramsOrClient.uri,\n paramsOrClient.options,\n paramsOrClient.webSocketImpl,\n );\n }\n }\n\n public request(operation: Operation): Observable<FetchResult> | null {\n return this.subscriptionClient.request(operation) as Observable<\n FetchResult\n >;\n }\n}\n"],"names":["tslib_1.__extends","SubscriptionClient","ApolloLink"],"mappings":";;;;;;;MA6BmCA,yCAAU;MAG3C,uBACE,cAAgE;UADlE,YAGE,iBAAO,SAWR;UATC,IAAI,cAAc,YAAYC,2CAAkB,EAAE;cAChD,KAAI,CAAC,kBAAkB,GAAG,cAAc,CAAC;WAC1C;eAAM;cACL,KAAI,CAAC,kBAAkB,GAAG,IAAIA,2CAAkB,CAC9C,cAAc,CAAC,GAAG,EAClB,cAAc,CAAC,OAAO,EACtB,cAAc,CAAC,aAAa,CAC7B,CAAC;WACH;;OACF;MAEM,+BAAO,GAAd,UAAe,SAAoB;UACjC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,SAAS,CAE/C,CAAC;OACH;MACH,oBAAC;EAAD,CAxBA,CAAmCC,qBAAU;;;;;;;;;;;;"}