@teambit/graphql 1.0.187 → 1.0.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.harmony/graphql@1.0.187" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/graphql@1.0.189" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/graphql-preview"]=t():e["teambit.harmony/graphql-preview"]=t()}(self,(()=>(()=>{"use strict";var e={32869:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.187",homepage:"https://bit.cloud/teambit/harmony/graphql",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-grphql.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>d,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(32869);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(this,arguments)}var c={},s="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/graphql-preview"]=t():e["teambit.harmony/graphql-preview"]=t()}(self,(()=>(()=>{"use strict";var e={45507:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.189",homepage:"https://bit.cloud/teambit/harmony/graphql",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-grphql.svg"}));a.__bit_component=r,t.Logo=a},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>d,compositions_metadata:()=>f,overview:()=>u});var e={};o.r(e),o.d(e,{default:()=>l});var t=o(45507);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(this,arguments)}var c={},s="wrapper";function l(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}l.isMDXComponent=!0;const d=[t],u=[e],f={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
@@ -125,7 +125,8 @@
125
125
  "line": 8,
126
126
  "character": 23
127
127
  },
128
- "name": "DocumentNode"
128
+ "name": "DocumentNode",
129
+ "packageName": "graphql"
129
130
  }
130
131
  ]
131
132
  },
@@ -205,7 +206,8 @@
205
206
  "line": 10,
206
207
  "character": 22
207
208
  },
208
- "name": "SchemaDirectives"
209
+ "name": "SchemaDirectives",
210
+ "packageName": "@graphql-modules/core"
209
211
  },
210
212
  "isOptional": true
211
213
  }
@@ -247,7 +249,8 @@
247
249
  "line": 54,
248
250
  "character": 22
249
251
  },
250
- "name": "GraphQLConfig"
252
+ "name": "GraphQLConfig",
253
+ "internalFilePath": "graphql.main.runtime.ts"
251
254
  },
252
255
  "isOptional": false,
253
256
  "isSpread": false
@@ -287,7 +290,12 @@
287
290
  "line": 64,
288
291
  "character": 22
289
292
  },
290
- "name": "Harmony"
293
+ "name": "Harmony",
294
+ "componentId": {
295
+ "scope": "teambit.harmony",
296
+ "name": "harmony",
297
+ "version": "0.4.6"
298
+ }
291
299
  },
292
300
  "isOptional": false,
293
301
  "isSpread": false
@@ -307,7 +315,11 @@
307
315
  "line": 69,
308
316
  "character": 22
309
317
  },
310
- "name": "Logger"
318
+ "name": "Logger",
319
+ "componentId": {
320
+ "scope": "teambit.harmony",
321
+ "name": "logger"
322
+ }
311
323
  },
312
324
  "isOptional": false,
313
325
  "isSpread": false
@@ -327,7 +339,8 @@
327
339
  "line": 71,
328
340
  "character": 32
329
341
  },
330
- "name": "GraphQLServerSlot"
342
+ "name": "GraphQLServerSlot",
343
+ "internalFilePath": "graphql.main.runtime.ts"
331
344
  },
332
345
  "isOptional": false,
333
346
  "isSpread": false
@@ -347,7 +360,8 @@
347
360
  "line": 76,
348
361
  "character": 25
349
362
  },
350
- "name": "PubSubSlot"
363
+ "name": "PubSubSlot",
364
+ "internalFilePath": "graphql.main.runtime.ts"
351
365
  },
352
366
  "isOptional": false,
353
367
  "isSpread": false
@@ -521,7 +535,8 @@
521
535
  "line": 108,
522
536
  "character": 31
523
537
  },
524
- "name": "GraphQLServerOptions"
538
+ "name": "GraphQLServerOptions",
539
+ "internalFilePath": "graphql.main.runtime.ts"
525
540
  },
526
541
  "isOptional": false,
527
542
  "isSpread": false
@@ -627,7 +642,8 @@
627
642
  "line": 172,
628
643
  "character": 26
629
644
  },
630
- "name": "PubSubEngine"
645
+ "name": "PubSubEngine",
646
+ "packageName": "graphql-subscriptions"
631
647
  },
632
648
  "isOptional": false,
633
649
  "isSpread": false
@@ -699,7 +715,8 @@
699
715
  "line": 182,
700
716
  "character": 40
701
717
  },
702
- "name": "Server"
718
+ "name": "Server",
719
+ "packageName": "http"
703
720
  },
704
721
  "isOptional": true,
705
722
  "isSpread": false
@@ -719,7 +736,8 @@
719
736
  "line": 182,
720
737
  "character": 54
721
738
  },
722
- "name": "Express"
739
+ "name": "Express",
740
+ "packageName": "express"
723
741
  },
724
742
  "isOptional": true,
725
743
  "isSpread": false
@@ -907,7 +925,11 @@
907
925
  "line": 317,
908
926
  "character": 23
909
927
  },
910
- "name": "LoggerMain"
928
+ "name": "LoggerMain",
929
+ "componentId": {
930
+ "scope": "teambit.harmony",
931
+ "name": "logger"
932
+ }
911
933
  }
912
934
  ]
913
935
  },
@@ -929,7 +951,8 @@
929
951
  "line": 318,
930
952
  "character": 13
931
953
  },
932
- "name": "GraphQLConfig"
954
+ "name": "GraphQLConfig",
955
+ "internalFilePath": "graphql.main.runtime.ts"
933
956
  },
934
957
  "isOptional": false,
935
958
  "isSpread": false
@@ -966,7 +989,8 @@
966
989
  "line": 319,
967
990
  "character": 63
968
991
  },
969
- "name": "GraphQLServerSlot"
992
+ "name": "GraphQLServerSlot",
993
+ "internalFilePath": "graphql.main.runtime.ts"
970
994
  },
971
995
  {
972
996
  "__schema": "TypeRefSchema",
@@ -975,7 +999,8 @@
975
999
  "line": 319,
976
1000
  "character": 82
977
1001
  },
978
- "name": "PubSubSlot"
1002
+ "name": "PubSubSlot",
1003
+ "internalFilePath": "graphql.main.runtime.ts"
979
1004
  }
980
1005
  ]
981
1006
  },
@@ -997,7 +1022,12 @@
997
1022
  "line": 320,
998
1023
  "character": 14
999
1024
  },
1000
- "name": "Harmony"
1025
+ "name": "Harmony",
1026
+ "componentId": {
1027
+ "scope": "teambit.harmony",
1028
+ "name": "harmony",
1029
+ "version": "0.4.6"
1030
+ }
1001
1031
  },
1002
1032
  "isOptional": false,
1003
1033
  "isSpread": false
@@ -1038,6 +1068,11 @@
1038
1068
  "character": 26
1039
1069
  },
1040
1070
  "name": "SlotRegistry",
1071
+ "componentId": {
1072
+ "scope": "teambit.harmony",
1073
+ "name": "harmony",
1074
+ "version": "0.4.6"
1075
+ },
1041
1076
  "typeArgs": [
1042
1077
  {
1043
1078
  "__schema": "TypeRefSchema",
@@ -1106,7 +1141,8 @@
1106
1141
  "line": 31,
1107
1142
  "character": 57
1108
1143
  },
1109
- "name": "ClientOptions"
1144
+ "name": "ClientOptions",
1145
+ "internalFilePath": "graphql.ui.runtime.tsx"
1110
1146
  },
1111
1147
  "isOptional": true,
1112
1148
  "defaultValue": "{}",
@@ -1432,7 +1468,19 @@
1432
1468
  "character": 1
1433
1469
  },
1434
1470
  "raw": "/**\n * Type of gql client.\n * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly\n * */",
1435
- "comment": "Type of gql client.\nUsed to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly"
1471
+ "comment": "Type of gql client.\nUsed to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on",
1472
+ "tags": [
1473
+ {
1474
+ "__schema": "TagSchema",
1475
+ "location": {
1476
+ "filePath": "graphql.ui.runtime.tsx",
1477
+ "line": 19,
1478
+ "character": 114
1479
+ },
1480
+ "tagName": "apollo",
1481
+ "comment": "/client directly"
1482
+ }
1483
+ ]
1436
1484
  },
1437
1485
  "signature": "type GraphQLClient<T> = ApolloClient<T>",
1438
1486
  "name": "GraphQLClient",
@@ -1444,6 +1492,7 @@
1444
1492
  "character": 32
1445
1493
  },
1446
1494
  "name": "ApolloClient",
1495
+ "packageName": "@apollo/client",
1447
1496
  "typeArgs": [
1448
1497
  {
1449
1498
  "__schema": "TypeRefSchema",
@@ -1534,7 +1583,8 @@
1534
1583
  "line": 10,
1535
1584
  "character": 55
1536
1585
  },
1537
- "name": "GraphQLProviderProps"
1586
+ "name": "GraphQLProviderProps",
1587
+ "internalFilePath": "graphql-provider/graphql-provider.tsx"
1538
1588
  },
1539
1589
  "isOptional": false,
1540
1590
  "objectBindingNodes": [
@@ -1772,7 +1822,8 @@
1772
1822
  "line": 8,
1773
1823
  "character": 23
1774
1824
  },
1775
- "name": "DocumentNode"
1825
+ "name": "DocumentNode",
1826
+ "packageName": "graphql"
1776
1827
  }
1777
1828
  ]
1778
1829
  },
@@ -1852,7 +1903,8 @@
1852
1903
  "line": 10,
1853
1904
  "character": 22
1854
1905
  },
1855
- "name": "SchemaDirectives"
1906
+ "name": "SchemaDirectives",
1907
+ "packageName": "@graphql-modules/core"
1856
1908
  },
1857
1909
  "isOptional": true
1858
1910
  }
@@ -2029,6 +2081,11 @@
2029
2081
  "character": 33
2030
2082
  },
2031
2083
  "name": "SlotRegistry",
2084
+ "componentId": {
2085
+ "scope": "teambit.harmony",
2086
+ "name": "harmony",
2087
+ "version": "0.4.6"
2088
+ },
2032
2089
  "typeArgs": [
2033
2090
  {
2034
2091
  "__schema": "TypeRefSchema",
@@ -2059,6 +2116,11 @@
2059
2116
  "character": 26
2060
2117
  },
2061
2118
  "name": "SlotRegistry",
2119
+ "componentId": {
2120
+ "scope": "teambit.harmony",
2121
+ "name": "harmony",
2122
+ "version": "0.4.6"
2123
+ },
2062
2124
  "typeArgs": [
2063
2125
  {
2064
2126
  "__schema": "TypeRefSchema",
@@ -2089,6 +2151,11 @@
2089
2151
  "character": 26
2090
2152
  },
2091
2153
  "name": "SlotRegistry",
2154
+ "componentId": {
2155
+ "scope": "teambit.harmony",
2156
+ "name": "harmony",
2157
+ "version": "0.4.6"
2158
+ },
2092
2159
  "typeArgs": [
2093
2160
  {
2094
2161
  "__schema": "TypeRefSchema",
@@ -2097,7 +2164,8 @@
2097
2164
  "line": 37,
2098
2165
  "character": 39
2099
2166
  },
2100
- "name": "PubSubEngine"
2167
+ "name": "PubSubEngine",
2168
+ "packageName": "graphql-subscriptions"
2101
2169
  }
2102
2170
  ]
2103
2171
  }
@@ -2155,7 +2223,8 @@
2155
2223
  "line": 41,
2156
2224
  "character": 9
2157
2225
  },
2158
- "name": "Express"
2226
+ "name": "Express",
2227
+ "packageName": "express"
2159
2228
  },
2160
2229
  "isOptional": true
2161
2230
  },
@@ -2313,7 +2382,8 @@
2313
2382
  "line": 54,
2314
2383
  "character": 22
2315
2384
  },
2316
- "name": "GraphQLConfig"
2385
+ "name": "GraphQLConfig",
2386
+ "internalFilePath": "graphql.main.runtime.ts"
2317
2387
  },
2318
2388
  "isOptional": false,
2319
2389
  "isSpread": false
@@ -2353,7 +2423,12 @@
2353
2423
  "line": 64,
2354
2424
  "character": 22
2355
2425
  },
2356
- "name": "Harmony"
2426
+ "name": "Harmony",
2427
+ "componentId": {
2428
+ "scope": "teambit.harmony",
2429
+ "name": "harmony",
2430
+ "version": "0.4.6"
2431
+ }
2357
2432
  },
2358
2433
  "isOptional": false,
2359
2434
  "isSpread": false
@@ -2373,7 +2448,11 @@
2373
2448
  "line": 69,
2374
2449
  "character": 22
2375
2450
  },
2376
- "name": "Logger"
2451
+ "name": "Logger",
2452
+ "componentId": {
2453
+ "scope": "teambit.harmony",
2454
+ "name": "logger"
2455
+ }
2377
2456
  },
2378
2457
  "isOptional": false,
2379
2458
  "isSpread": false
@@ -2393,7 +2472,8 @@
2393
2472
  "line": 71,
2394
2473
  "character": 32
2395
2474
  },
2396
- "name": "GraphQLServerSlot"
2475
+ "name": "GraphQLServerSlot",
2476
+ "internalFilePath": "graphql.main.runtime.ts"
2397
2477
  },
2398
2478
  "isOptional": false,
2399
2479
  "isSpread": false
@@ -2413,7 +2493,8 @@
2413
2493
  "line": 76,
2414
2494
  "character": 25
2415
2495
  },
2416
- "name": "PubSubSlot"
2496
+ "name": "PubSubSlot",
2497
+ "internalFilePath": "graphql.main.runtime.ts"
2417
2498
  },
2418
2499
  "isOptional": false,
2419
2500
  "isSpread": false
@@ -2587,7 +2668,8 @@
2587
2668
  "line": 108,
2588
2669
  "character": 31
2589
2670
  },
2590
- "name": "GraphQLServerOptions"
2671
+ "name": "GraphQLServerOptions",
2672
+ "internalFilePath": "graphql.main.runtime.ts"
2591
2673
  },
2592
2674
  "isOptional": false,
2593
2675
  "isSpread": false
@@ -2693,7 +2775,8 @@
2693
2775
  "line": 172,
2694
2776
  "character": 26
2695
2777
  },
2696
- "name": "PubSubEngine"
2778
+ "name": "PubSubEngine",
2779
+ "packageName": "graphql-subscriptions"
2697
2780
  },
2698
2781
  "isOptional": false,
2699
2782
  "isSpread": false
@@ -2765,7 +2848,8 @@
2765
2848
  "line": 182,
2766
2849
  "character": 40
2767
2850
  },
2768
- "name": "Server"
2851
+ "name": "Server",
2852
+ "packageName": "http"
2769
2853
  },
2770
2854
  "isOptional": true,
2771
2855
  "isSpread": false
@@ -2785,7 +2869,8 @@
2785
2869
  "line": 182,
2786
2870
  "character": 54
2787
2871
  },
2788
- "name": "Express"
2872
+ "name": "Express",
2873
+ "packageName": "express"
2789
2874
  },
2790
2875
  "isOptional": true,
2791
2876
  "isSpread": false
@@ -2973,7 +3058,11 @@
2973
3058
  "line": 317,
2974
3059
  "character": 23
2975
3060
  },
2976
- "name": "LoggerMain"
3061
+ "name": "LoggerMain",
3062
+ "componentId": {
3063
+ "scope": "teambit.harmony",
3064
+ "name": "logger"
3065
+ }
2977
3066
  }
2978
3067
  ]
2979
3068
  },
@@ -2995,7 +3084,8 @@
2995
3084
  "line": 318,
2996
3085
  "character": 13
2997
3086
  },
2998
- "name": "GraphQLConfig"
3087
+ "name": "GraphQLConfig",
3088
+ "internalFilePath": "graphql.main.runtime.ts"
2999
3089
  },
3000
3090
  "isOptional": false,
3001
3091
  "isSpread": false
@@ -3032,7 +3122,8 @@
3032
3122
  "line": 319,
3033
3123
  "character": 63
3034
3124
  },
3035
- "name": "GraphQLServerSlot"
3125
+ "name": "GraphQLServerSlot",
3126
+ "internalFilePath": "graphql.main.runtime.ts"
3036
3127
  },
3037
3128
  {
3038
3129
  "__schema": "TypeRefSchema",
@@ -3041,7 +3132,8 @@
3041
3132
  "line": 319,
3042
3133
  "character": 82
3043
3134
  },
3044
- "name": "PubSubSlot"
3135
+ "name": "PubSubSlot",
3136
+ "internalFilePath": "graphql.main.runtime.ts"
3045
3137
  }
3046
3138
  ]
3047
3139
  },
@@ -3063,7 +3155,12 @@
3063
3155
  "line": 320,
3064
3156
  "character": 14
3065
3157
  },
3066
- "name": "Harmony"
3158
+ "name": "Harmony",
3159
+ "componentId": {
3160
+ "scope": "teambit.harmony",
3161
+ "name": "harmony",
3162
+ "version": "0.4.6"
3163
+ }
3067
3164
  },
3068
3165
  "isOptional": false,
3069
3166
  "isSpread": false
@@ -3124,7 +3221,19 @@
3124
3221
  "character": 1
3125
3222
  },
3126
3223
  "raw": "/**\n * Type of gql client.\n * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly\n * */",
3127
- "comment": "Type of gql client.\nUsed to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly"
3224
+ "comment": "Type of gql client.\nUsed to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on",
3225
+ "tags": [
3226
+ {
3227
+ "__schema": "TagSchema",
3228
+ "location": {
3229
+ "filePath": "graphql.ui.runtime.tsx",
3230
+ "line": 19,
3231
+ "character": 114
3232
+ },
3233
+ "tagName": "apollo",
3234
+ "comment": "/client directly"
3235
+ }
3236
+ ]
3128
3237
  },
3129
3238
  "signature": "type GraphQLClient<T> = ApolloClient<T>",
3130
3239
  "name": "GraphQLClient",
@@ -3136,6 +3245,7 @@
3136
3245
  "character": 32
3137
3246
  },
3138
3247
  "name": "ApolloClient",
3248
+ "packageName": "@apollo/client",
3139
3249
  "typeArgs": [
3140
3250
  {
3141
3251
  "__schema": "TypeRefSchema",
@@ -3204,7 +3314,8 @@
3204
3314
  "line": 31,
3205
3315
  "character": 57
3206
3316
  },
3207
- "name": "ClientOptions"
3317
+ "name": "ClientOptions",
3318
+ "internalFilePath": "graphql.ui.runtime.tsx"
3208
3319
  },
3209
3320
  "isOptional": true,
3210
3321
  "defaultValue": "{}",
@@ -3560,7 +3671,8 @@
3560
3671
  "line": 25,
3561
3672
  "character": 11
3562
3673
  },
3563
- "name": "NormalizedCacheObject"
3674
+ "name": "NormalizedCacheObject",
3675
+ "packageName": "@apollo/client"
3564
3676
  },
3565
3677
  "isOptional": true
3566
3678
  },
@@ -3681,7 +3793,8 @@
3681
3793
  "line": 7,
3682
3794
  "character": 13
3683
3795
  },
3684
- "name": "ReactNode"
3796
+ "name": "ReactNode",
3797
+ "packageName": "react"
3685
3798
  },
3686
3799
  "isOptional": false
3687
3800
  }
@@ -3712,7 +3825,8 @@
3712
3825
  "line": 10,
3713
3826
  "character": 55
3714
3827
  },
3715
- "name": "GraphQLProviderProps"
3828
+ "name": "GraphQLProviderProps",
3829
+ "internalFilePath": "graphql-provider/graphql-provider.tsx"
3716
3830
  },
3717
3831
  "isOptional": false,
3718
3832
  "objectBindingNodes": [
@@ -3762,7 +3876,7 @@
3762
3876
  "componentId": {
3763
3877
  "scope": "teambit.harmony",
3764
3878
  "name": "graphql",
3765
- "version": "1.0.187"
3879
+ "version": "1.0.189"
3766
3880
  },
3767
3881
  "taggedModuleExports": []
3768
3882
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_client","data","require","_utilities","createSplitLink","httpLink","wsLink","split","query","definition","getMainDefinition","kind","operation"],"sources":["create-link.ts"],"sourcesContent":["import { HttpLink, split } from '@apollo/client';\nimport { getMainDefinition } from '@apollo/client/utilities';\nimport type { WebSocketLink } from '@apollo/client/link/ws';\n\n/**\n * create a link which splits routes data depending on type of operation.\n * @param httpLink http link for apollo graphql\n * @param wsLink web socket link for apollo graphql\n */\nexport function createSplitLink(httpLink: HttpLink, wsLink: WebSocketLink) {\n return split(\n // split based on operation type\n ({ query }) => {\n const definition = getMainDefinition(query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACO,SAASG,eAAeA,CAACC,QAAkB,EAAEC,MAAqB,EAAE;EACzE,OAAO,IAAAC,eAAK;EACV;EACA,CAAC;IAAEC;EAAM,CAAC,KAAK;IACb,MAAMC,UAAU,GAAG,IAAAC,8BAAiB,EAACF,KAAK,CAAC;IAC3C,OAAOC,UAAU,CAACE,IAAI,KAAK,qBAAqB,IAAIF,UAAU,CAACG,SAAS,KAAK,cAAc;EAC7F,CAAC,EACDN,MAAM,EACND,QACF,CAAC;AACH"}
1
+ {"version":3,"names":["_client","data","require","_utilities","createSplitLink","httpLink","wsLink","split","query","definition","getMainDefinition","kind","operation"],"sources":["create-link.ts"],"sourcesContent":["import { HttpLink, split } from '@apollo/client';\nimport { getMainDefinition } from '@apollo/client/utilities';\nimport type { WebSocketLink } from '@apollo/client/link/ws';\n\n/**\n * create a link which splits routes data depending on type of operation.\n * @param httpLink http link for apollo graphql\n * @param wsLink web socket link for apollo graphql\n */\nexport function createSplitLink(httpLink: HttpLink, wsLink: WebSocketLink) {\n return split(\n // split based on operation type\n ({ query }) => {\n const definition = getMainDefinition(query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink\n );\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACO,SAASG,eAAeA,CAACC,QAAkB,EAAEC,MAAqB,EAAE;EACzE,OAAO,IAAAC,eAAK;EACV;EACA,CAAC;IAAEC;EAAM,CAAC,KAAK;IACb,MAAMC,UAAU,GAAG,IAAAC,8BAAiB,EAACF,KAAK,CAAC;IAC3C,OAAOC,UAAU,CAACE,IAAI,KAAK,qBAAqB,IAAIF,UAAU,CAACG,SAAS,KAAK,cAAc;EAC7F,CAAC,EACDN,MAAM,EACND,QACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_nodeFetch","data","_interopRequireDefault","require","_apolloLinkContext","_apolloLinkHttp","_apolloServer","_apolloLinkWs","_apolloLink","_apolloUtilities","_subscriptionsTransportWs","_ws","obj","__esModule","default","getRemoteSchema","uri","subscriptionsUri","wrappingLink","ApolloLink","operation","forward","map","response","context","getContext","headers","get","graphqlContext","res","setHeader","http","HttpLink","fetch","httpLink","setContext","request","previousContext","concat","makeRemoteExecutableSchema","schema","introspectSchema","link","client","SubscriptionClient","reconnect","ws","wsLink","WebSocketLink","split","definition","getMainDefinition","query","kind","createRemoteSchemas","servers","schemasP","server","Promise","all"],"sources":["create-remote-schemas.ts"],"sourcesContent":["import fetch from 'node-fetch';\nimport { setContext } from 'apollo-link-context';\nimport { HttpLink } from 'apollo-link-http';\nimport { makeRemoteExecutableSchema, introspectSchema } from 'apollo-server';\nimport { WebSocketLink } from 'apollo-link-ws';\nimport { split, ApolloLink } from 'apollo-link';\nimport { getMainDefinition } from 'apollo-utilities';\nimport { SubscriptionClient } from 'subscriptions-transport-ws';\nimport ws from 'ws';\nimport { GraphQLServer } from '../graphql-server';\n\nasync function getRemoteSchema({ uri, subscriptionsUri }) {\n const wrappingLink = new ApolloLink((operation, forward) => {\n return forward(operation).map((response) => {\n const context = operation.getContext();\n if (context?.response?.headers?.get('set-cookie')) {\n context?.graphqlContext?.res?.setHeader('set-cookie', context?.response?.headers?.get('set-cookie'));\n }\n return response;\n });\n });\n // @ts-ignore\n const http = new HttpLink({ uri, fetch });\n const httpLink = setContext((request, previousContext) => {\n return {\n headers: previousContext?.graphqlContext?.headers,\n };\n })\n .concat(wrappingLink)\n .concat(http);\n\n if (!subscriptionsUri) {\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link: httpLink,\n });\n }\n\n // Create WebSocket link with custom client\n const client = new SubscriptionClient(subscriptionsUri, { reconnect: true }, ws);\n const wsLink = new WebSocketLink(client);\n\n // Using the ability to split links, we can send data to each link\n // depending on what kind of operation is being sent\n const link = split(\n (operation) => {\n const definition = getMainDefinition(operation.query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink\n );\n\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link,\n });\n}\n\nexport async function createRemoteSchemas(servers: GraphQLServer[]) {\n const schemasP = servers.map(async (server) => {\n return getRemoteSchema({\n uri: server.uri,\n subscriptionsUri: server.subscriptionsUri,\n });\n });\n\n return Promise.all(schemasP);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAA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ACxCQ;EACF,CAAC,CAAC;AACJ;AAEO,eAAeY,mBAAmBA,CAACC,OAAwB,EAAE;EAClE,MAAMC,QAAQ,GAAGD,OAAO,CAACjC,GAAG,CAAC,MAAOmC,MAAM,IAAK;IAC7C,OAAO1C,eAAe,CAAC;MACrBC,GAAG,EAAEyC,MAAM,CAACzC,GAAG;MACfC,gBAAgB,EAAEwC,MAAM,CAACxC;IAC3B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOyC,OAAO,CAACC,GAAG,CAACH,QAAQ,CAAC;AAC9B"}
1
+ {"version":3,"names":["_nodeFetch","data","_interopRequireDefault","require","_apolloLinkContext","_apolloLinkHttp","_apolloServer","_apolloLinkWs","_apolloLink","_apolloUtilities","_subscriptionsTransportWs","_ws","obj","__esModule","default","getRemoteSchema","uri","subscriptionsUri","wrappingLink","ApolloLink","operation","forward","map","response","context","getContext","headers","get","graphqlContext","res","setHeader","http","HttpLink","fetch","httpLink","setContext","request","previousContext","concat","makeRemoteExecutableSchema","schema","introspectSchema","link","client","SubscriptionClient","reconnect","ws","wsLink","WebSocketLink","split","definition","getMainDefinition","query","kind","createRemoteSchemas","servers","schemasP","server","Promise","all"],"sources":["create-remote-schemas.ts"],"sourcesContent":["import fetch from 'node-fetch';\nimport { setContext } from 'apollo-link-context';\nimport { HttpLink } from 'apollo-link-http';\nimport { makeRemoteExecutableSchema, introspectSchema } from 'apollo-server';\nimport { WebSocketLink } from 'apollo-link-ws';\nimport { split, ApolloLink } from 'apollo-link';\nimport { getMainDefinition } from 'apollo-utilities';\nimport { SubscriptionClient } from 'subscriptions-transport-ws';\nimport ws from 'ws';\nimport { GraphQLServer } from '../graphql-server';\n\nasync function getRemoteSchema({ uri, subscriptionsUri }) {\n const wrappingLink = new ApolloLink((operation, forward) => {\n return forward(operation).map((response) => {\n const context = operation.getContext();\n if (context?.response?.headers?.get('set-cookie')) {\n context?.graphqlContext?.res?.setHeader('set-cookie', context?.response?.headers?.get('set-cookie'));\n }\n return response;\n });\n });\n // @ts-ignore\n const http = new HttpLink({ uri, fetch });\n const httpLink = setContext((request, previousContext) => {\n return {\n headers: previousContext?.graphqlContext?.headers,\n };\n })\n .concat(wrappingLink)\n .concat(http);\n\n if (!subscriptionsUri) {\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link: httpLink,\n });\n }\n\n // Create WebSocket link with custom client\n const client = new SubscriptionClient(subscriptionsUri, { reconnect: true }, ws);\n const wsLink = new WebSocketLink(client);\n\n // Using the ability to split links, we can send data to each link\n // depending on what kind of operation is being sent\n const link = split(\n (operation) => {\n const definition = getMainDefinition(operation.query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink\n );\n\n return makeRemoteExecutableSchema({\n schema: await introspectSchema(httpLink),\n link,\n });\n}\n\nexport async function createRemoteSchemas(servers: GraphQLServer[]) {\n const schemasP = servers.map(async (server) => {\n return getRemoteSchema({\n uri: server.uri,\n subscriptionsUri: server.subscriptionsUri,\n });\n });\n\n return Promise.all(schemasP);\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,gBAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,eAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,cAAA;EAAA,MAAAN,IA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CAAC,MAAOmC,MAAM,IAAK;IAC7C,OAAO1C,eAAe,CAAC;MACrBC,GAAG,EAAEyC,MAAM,CAACzC,GAAG;MACfC,gBAAgB,EAAEwC,MAAM,CAACxC;IAC3B,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAOyC,OAAO,CAACC,GAAG,CAACH,QAAQ,CAAC;AAC9B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_createRemoteSchemas","data","require"],"sources":["index.ts"],"sourcesContent":["export { createRemoteSchemas } from './create-remote-schemas';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,qBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,oBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_createRemoteSchemas","data","require"],"sources":["index.ts"],"sourcesContent":["export { createRemoteSchemas } from './create-remote-schemas';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,qBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,oBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["GraphQlError","constructor","code","message","exports"],"sources":["graphql-error.ts"],"sourcesContent":["export class GraphQlError {\n constructor(\n /**\n * http status code of error\n */\n public readonly code: number,\n\n /**\n * error message of the error\n */\n public readonly message?: string\n ) {}\n}\n"],"mappings":";;;;;;AAAO,MAAMA,YAAY,CAAC;EACxBC,WAAWA;EACT;AACJ;AACA;EACoBC,IAAY;EAE5B;AACJ;AACA;EACoBC,OAAgB,EAChC;IAAA,KANgBD,IAAY,GAAZA,IAAY;IAAA,KAKZC,OAAgB,GAAhBA,OAAgB;EAC/B;AACL;AAACC,OAAA,CAAAJ,YAAA,GAAAA,YAAA"}
1
+ {"version":3,"names":["GraphQlError","constructor","code","message","exports"],"sources":["graphql-error.ts"],"sourcesContent":["export class GraphQlError {\n constructor(\n /**\n * http status code of error\n */\n public readonly code: number,\n\n /**\n * error message of the error\n */\n public readonly message?: string\n ) {}\n}\n"],"mappings":";;;;;;AAAO,MAAMA,YAAY,CAAC;EACxBC,WAAWA;EACT;AACJ;AACA;EACoBC,IAAY;EAE5B;AACJ;AACA;EACoBC,OAAgB,EAChC;IAAA,KANgBD,IAAY,GAAZA,IAAY;IAAA,KAKZC,OAAgB,GAAhBA,OAAgB;EAC/B;AACL;AAACC,OAAA,CAAAJ,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_client","obj","__esModule","default","GraphQLProvider","client","children","createElement","ApolloProvider"],"sources":["graphql-provider.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { ApolloProvider } from '@apollo/client';\nimport type { GraphQLClient } from '../graphql.ui.runtime';\n\nexport type GraphQLProviderProps = {\n client: GraphQLClient<any>;\n children: ReactNode;\n};\n\nexport function GraphQLProvider({ client, children }: GraphQLProviderProps) {\n return <ApolloProvider client={client}>{children}</ApolloProvider>;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQzC,SAASG,eAAeA,CAAC;EAAEC,MAAM;EAAEC;AAA+B,CAAC,EAAE;EAC1E,oBAAOV,MAAA,GAAAO,OAAA,CAAAI,aAAA,CAACP,OAAA,GAAAQ,cAAc;IAACH,MAAM,EAAEA;EAAO,GAAEC,QAAyB,CAAC;AACpE"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_client","obj","__esModule","default","GraphQLProvider","client","children","createElement","ApolloProvider"],"sources":["graphql-provider.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { ApolloProvider } from '@apollo/client';\nimport type { GraphQLClient } from '../graphql.ui.runtime';\n\nexport type GraphQLProviderProps = {\n client: GraphQLClient<any>;\n children: ReactNode;\n};\n\nexport function GraphQLProvider({ client, children }: GraphQLProviderProps) {\n return <ApolloProvider client={client}>{children}</ApolloProvider>;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAgD,SAAAC,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQzC,SAASG,eAAeA,CAAC;EAAEC,MAAM;EAAEC;AAA+B,CAAC,EAAE;EAC1E,oBAAOV,MAAA,GAAAO,OAAA,CAAAI,aAAA,CAACP,OAAA,GAAAQ,cAAc;IAACH,MAAM,EAAEA;EAAO,GAAEC,QAAyB,CAAC;AACpE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_graphqlProvider","data","require"],"sources":["index.ts"],"sourcesContent":["export { GraphQLProvider } from './graphql-provider';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,iBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,gBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_graphqlProvider","data","require"],"sources":["index.ts"],"sourcesContent":["export { GraphQLProvider } from './graphql-provider';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,iBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,gBAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["graphql-server.ts"],"sourcesContent":["export interface GraphQLServer {\n uri: string;\n\n subscriptionsUri?: string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["graphql-server.ts"],"sourcesContent":["export interface GraphQLServer {\n uri: string;\n\n subscriptionsUri?: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_harmony","data","require","GraphqlAspect","exports","Aspect","create","id","dependencies","defaultConfig","_default","default"],"sources":["graphql.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const GraphqlAspect = Aspect.create({\n id: 'teambit.harmony/graphql',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default GraphqlAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACzCC,EAAE,EAAE,yBAAyB;EAC7BC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAO,OAAA,GAEYR,aAAa"}
1
+ {"version":3,"names":["_harmony","data","require","GraphqlAspect","exports","Aspect","create","id","dependencies","defaultConfig","_default","default"],"sources":["graphql.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const GraphqlAspect = Aspect.create({\n id: 'teambit.harmony/graphql',\n dependencies: [],\n defaultConfig: {},\n});\n\nexport default GraphqlAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACzCC,EAAE,EAAE,yBAAyB;EAC7BC,YAAY,EAAE,EAAE;EAChBC,aAAa,EAAE,CAAC;AAClB,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAN,OAAA,CAAAO,OAAA,GAEYR,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["graphql.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/brands/logo-grphql.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA+C,CAAE,CAC7E,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","obj","__esModule","default","Logo","createElement","style","height","display","justifyContent","width","src","exports"],"sources":["graphql.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/brands/logo-grphql.svg\" />\n </div>\n);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA0B,SAAAC,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEnB,MAAMG,IAAI,GAAGA,CAAA,kBAClBP,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxEZ,MAAA,GAAAM,OAAA,CAAAE,aAAA;EAAKC,KAAK,EAAE;IAAEI,KAAK,EAAE;EAAG,CAAE;EAACC,GAAG,EAAC;AAA+C,CAAE,CAC7E,CACN;AAACC,OAAA,CAAAR,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="got/dist/source/core/utils/timed-out" />
2
3
  import { Harmony, SlotRegistry } from '@teambit/harmony';
3
4
  import { Logger, LoggerMain } from '@teambit/logger';
4
5
  import { Express } from 'express';
@@ -1 +1 @@
1
- {"version":3,"names":["_schema","data","require","_graphqlDisableIntrospection","_interopRequireDefault","_core","_cli","_harmony","_logger","_express","_expressGraphql","_toolboxNetwork","_graphql","_graphqlSubscriptions","_http","_httpProxy","_subscriptionsTransportWs","_cors","_createRemoteSchemas","_graphql2","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","Verb","exports","GraphqlMain","constructor","config","moduleSlot","context","logger","graphQLServerSlot","pubSubSlot","Map","pubsub","pubSubSlots","values","PubSub","getSchema","aspectId","get","getSchemas","aspectIds","toArray","includes","map","schema","createServer","options","graphiql","disableIntrospection","localSchema","createRootModule","schemaSlot","remoteSchemas","createRemoteSchemas","schemas","concat","x","mergeSchemas","app","express","disableCors","use","cors","origin","callback","credentials","graphqlHTTP","request","res","params","customFormatErrorFn","err","error","assign","ERR_CODE","originalError","errors","name","HTTP_CODE","code","rootValue","validationRules","NoIntrospection","undefined","server","subscriptionsPort","subscriptionsPortRange","subscriptionServerPort","getPort","port","createSubscription","proxySubscription","registerServer","register","registerPubSub","Error","listen","serverPort","subServer","info","subscriptionsPath","range","from","to","Port","websocketServer","response","writeHead","end","debug","SubscriptionServer","execute","subscribe","onConnect","onWsConnect","path","proxServer","httpProxy","createProxyServer","on","req","socket","head","url","ws","target","host","modules","buildModules","GraphQLModule","imports","schemaSlots","extensionId","moduleDeps","getModuleDependencies","module","typeDefs","resolvers","schemaDirectives","session","verb","headers","READ","set","extension","extensions","deps","getDependencies","ids","dep","id","Array","entries","depId","provider","loggerFactory","createLogger","GraphqlAspect","graphqlMain","Slot","withType","MainRuntime","LoggerAspect","addRuntime"],"sources":["graphql.main.runtime.ts"],"sourcesContent":["import { mergeSchemas } from '@graphql-tools/schema';\nimport NoIntrospection from 'graphql-disable-introspection';\nimport { GraphQLModule } from '@graphql-modules/core';\nimport { MainRuntime } from '@teambit/cli';\nimport { Harmony, Slot, SlotRegistry } from '@teambit/harmony';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport express, { Express } from 'express';\nimport { graphqlHTTP } from 'express-graphql';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { execute, subscribe } from 'graphql';\nimport { PubSubEngine, PubSub } from 'graphql-subscriptions';\nimport { createServer, Server } from 'http';\nimport httpProxy from 'http-proxy';\nimport { SubscriptionServer } from 'subscriptions-transport-ws';\nimport cors from 'cors';\nimport { GraphQLServer } from './graphql-server';\nimport { createRemoteSchemas } from './create-remote-schemas';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { Schema } from './schema';\n\nexport enum Verb {\n WRITE = 'write',\n READ = 'read',\n}\n\nexport type GraphQLConfig = {\n port: number;\n subscriptionsPortRange: number[];\n subscriptionsPath: string;\n disableCors?: boolean;\n};\n\nexport type GraphQLServerSlot = SlotRegistry<GraphQLServer>;\n\nexport type SchemaSlot = SlotRegistry<Schema>;\n\nexport type PubSubSlot = SlotRegistry<PubSubEngine>;\n\nexport type GraphQLServerOptions = {\n schemaSlot?: SchemaSlot;\n app?: Express;\n graphiql?: boolean;\n disableIntrospection?: boolean;\n remoteSchemas?: GraphQLServer[];\n subscriptionsPortRange?: number[];\n onWsConnect?: Function;\n};\n\nexport class GraphqlMain {\n constructor(\n /**\n * extension config\n */\n readonly config: GraphQLConfig,\n\n /**\n * slot for registering graphql modules\n */\n private moduleSlot: SchemaSlot,\n\n /**\n * harmony context.\n */\n private context: Harmony,\n\n /**\n * logger extension.\n */\n readonly logger: Logger,\n\n private graphQLServerSlot: GraphQLServerSlot,\n\n /**\n * graphql pubsub. allows to emit events to clients.\n */\n private pubSubSlot: PubSubSlot\n ) {}\n\n get pubsub(): PubSubEngine {\n const pubSubSlots = this.pubSubSlot.values();\n if (pubSubSlots.length) return pubSubSlots[0];\n return new PubSub();\n }\n\n private modules = new Map<string, GraphQLModule>();\n\n /**\n * returns the schema for a specific aspect by its id.\n */\n getSchema(aspectId: string) {\n return this.moduleSlot.get(aspectId);\n }\n\n /**\n * get multiple schema by aspect ids.\n */\n getSchemas(aspectIds: string[]) {\n return this.moduleSlot\n .toArray()\n .filter(([aspectId]) => {\n return aspectIds.includes(aspectId);\n })\n .map(([, schema]) => {\n return schema;\n });\n }\n\n async createServer(options: GraphQLServerOptions) {\n const { graphiql = true, disableIntrospection } = options;\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // TODO: @guy please consider to refactor to express extension.\n const app = options.app || express();\n if (!this.config.disableCors) {\n app.use(\n // @ts-ignore todo: it's not clear what's the issue.\n cors({\n origin(origin, callback) {\n callback(null, true);\n },\n credentials: true,\n })\n );\n }\n\n app.use(\n '/graphql',\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n graphqlHTTP((request, res, params) => ({\n customFormatErrorFn: (err) => {\n this.logger.error('graphql got an error during running the following query:', params);\n this.logger.error('graphql error ', err);\n return Object.assign(err, {\n // @ts-ignore\n ERR_CODE: err?.originalError?.errors?.[0].ERR_CODE || err.originalError?.constructor?.name,\n // @ts-ignore\n HTTP_CODE: err?.originalError?.errors?.[0].HTTP_CODE || err.originalError?.code,\n });\n },\n schema,\n rootValue: request,\n graphiql,\n validationRules: disableIntrospection ? [NoIntrospection] : undefined,\n }))\n );\n\n const server = createServer(app);\n const subscriptionsPort = options.subscriptionsPortRange || this.config.subscriptionsPortRange;\n const subscriptionServerPort = await this.getPort(subscriptionsPort);\n const { port } = await this.createSubscription(options, subscriptionServerPort);\n this.proxySubscription(server, port);\n\n return server;\n }\n\n /**\n * register a new graphql server.\n */\n registerServer(server: GraphQLServer) {\n this.graphQLServerSlot.register(server);\n return this;\n }\n\n /**\n * register a pubsub client\n */\n registerPubSub(pubsub: PubSubEngine) {\n const pubSubSlots = this.pubSubSlot.toArray();\n if (pubSubSlots.length) throw new Error('can not register more then one pubsub provider');\n this.pubSubSlot.register(pubsub);\n return this;\n }\n\n /**\n * start a graphql server.\n */\n async listen(port?: number, server?: Server, app?: Express) {\n const serverPort = port || this.config.port;\n const subServer = server || (await this.createServer({ app }));\n\n subServer.listen(serverPort, () => {\n this.logger.info(`API Server over HTTP is now running on http://localhost:${serverPort}`);\n this.logger.info(\n `API Server over web socket with subscriptions is now running on ws://localhost:${serverPort}/${this.config.subscriptionsPath}`\n );\n });\n }\n\n /**\n * register a new graphql module.\n */\n register(schema: Schema) {\n // const module = new GraphQLModule(schema);\n this.moduleSlot.register(schema);\n return this;\n }\n\n private async getPort(range: number[]) {\n const [from, to] = range;\n return Port.getPort(from, to);\n }\n\n /** create Subscription server with different port */\n\n private async createSubscription(options: GraphQLServerOptions, port: number) {\n // Create WebSocket listener server\n const websocketServer = createServer((request, response) => {\n response.writeHead(404);\n response.end();\n });\n\n // Bind it to port and start listening\n websocketServer.listen(port, () =>\n this.logger.debug(`Websocket Server is now running on http://localhost:${port}`)\n );\n\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const subServer = new SubscriptionServer(\n {\n execute,\n subscribe,\n schema,\n onConnect: options.onWsConnect,\n },\n {\n server: websocketServer,\n path: this.config.subscriptionsPath,\n }\n );\n return { subServer, port };\n }\n /** proxy ws Subscription server to avoid conflict with different websocket connections */\n\n private proxySubscription(server: Server, port: number) {\n const proxServer = httpProxy.createProxyServer();\n const subscriptionsPath = this.config.subscriptionsPath;\n server.on('upgrade', function (req, socket, head) {\n if (req.url === subscriptionsPath) {\n proxServer.ws(req, socket, head, { target: { host: 'localhost', port } });\n }\n });\n }\n\n private createRootModule(schemaSlot?: SchemaSlot) {\n const modules = this.buildModules(schemaSlot);\n\n return new GraphQLModule({\n imports: modules,\n });\n }\n\n private buildModules(schemaSlot?: SchemaSlot) {\n const schemaSlots = schemaSlot ? schemaSlot.toArray() : this.moduleSlot.toArray();\n return schemaSlots.map(([extensionId, schema]) => {\n const moduleDeps = this.getModuleDependencies(extensionId);\n\n const module = new GraphQLModule({\n typeDefs: schema.typeDefs,\n resolvers: schema.resolvers,\n schemaDirectives: schema.schemaDirectives,\n imports: moduleDeps,\n context: (session) => {\n return {\n ...session,\n verb: session?.headers?.['x-verb'] || Verb.READ,\n };\n },\n });\n\n this.modules.set(extensionId, module);\n\n return module;\n });\n }\n\n private getModuleDependencies(extensionId: string): GraphQLModule[] {\n const extension = this.context.extensions.get(extensionId);\n if (!extension) throw new Error(`aspect ${extensionId} was not found`);\n const deps = this.context.getDependencies(extension);\n const ids = deps.map((dep) => dep.id);\n\n // @ts-ignore check :TODO why types are breaking here.\n return Array.from(this.modules.entries())\n .map(([depId, module]) => {\n const dep = ids.includes(depId);\n if (!dep) return undefined;\n return module;\n })\n .filter((module) => !!module);\n }\n\n static slots = [Slot.withType<Schema>(), Slot.withType<GraphQLServer>(), Slot.withType<PubSubSlot>()];\n\n static defaultConfig = {\n port: 4000,\n subscriptionsPortRange: [2000, 2100],\n disableCors: false,\n subscriptionsPath: '/subscriptions',\n };\n\n static runtime = MainRuntime;\n static dependencies = [LoggerAspect];\n\n static async provider(\n [loggerFactory]: [LoggerMain],\n config: GraphQLConfig,\n [moduleSlot, graphQLServerSlot, pubSubSlot]: [SchemaSlot, GraphQLServerSlot, PubSubSlot],\n context: Harmony\n ) {\n const logger = loggerFactory.createLogger(GraphqlAspect.id);\n const graphqlMain = new GraphqlMain(config, moduleSlot, context, logger, graphQLServerSlot, pubSubSlot);\n return graphqlMain;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlMain);\n"],"mappings":";;;;;;AAAA,SAAA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CAACE,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,MAAM,EAAEC,iBAAiB,EAAEC,UAAU,CAAC;IACvG,OAAOgI,WAAW;EACpB;AACF;AAACxI,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAAAnB,eAAA,CArRYmB,WAAW,WA+PP,CAACwI,eAAI,CAACC,QAAQ,CAAS,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAgB,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAa,CAAC,CAAC;AAAA5J,eAAA,CA/P1FmB,WAAW,mBAiQC;EACrBkE,IAAI,EAAE,IAAI;EACVH,sBAAsB,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;EACpC1B,WAAW,EAAE,KAAK;EAClBwC,iBAAiB,EAAE;AACrB,CAAC;AAAAhG,eAAA,CAtQUmB,WAAW,aAwQL0I,kBAAW;AAAA7J,eAAA,CAxQjBmB,WAAW,kBAyQA,CAAC2I,sBAAY,CAAC;AActCL,yBAAa,CAACM,UAAU,CAAC5I,WAAW,CAAC"}
1
+ {"version":3,"names":["_schema","data","require","_graphqlDisableIntrospection","_interopRequireDefault","_core","_cli","_harmony","_logger","_express","_expressGraphql","_toolboxNetwork","_graphql","_graphqlSubscriptions","_http","_httpProxy","_subscriptionsTransportWs","_cors","_createRemoteSchemas","_graphql2","obj","__esModule","default","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","Verb","exports","GraphqlMain","constructor","config","moduleSlot","context","logger","graphQLServerSlot","pubSubSlot","Map","pubsub","pubSubSlots","values","PubSub","getSchema","aspectId","get","getSchemas","aspectIds","toArray","includes","map","schema","createServer","options","graphiql","disableIntrospection","localSchema","createRootModule","schemaSlot","remoteSchemas","createRemoteSchemas","schemas","concat","x","mergeSchemas","app","express","disableCors","use","cors","origin","callback","credentials","graphqlHTTP","request","res","params","customFormatErrorFn","err","error","assign","ERR_CODE","originalError","errors","name","HTTP_CODE","code","rootValue","validationRules","NoIntrospection","undefined","server","subscriptionsPort","subscriptionsPortRange","subscriptionServerPort","getPort","port","createSubscription","proxySubscription","registerServer","register","registerPubSub","Error","listen","serverPort","subServer","info","subscriptionsPath","range","from","to","Port","websocketServer","response","writeHead","end","debug","SubscriptionServer","execute","subscribe","onConnect","onWsConnect","path","proxServer","httpProxy","createProxyServer","on","req","socket","head","url","ws","target","host","modules","buildModules","GraphQLModule","imports","schemaSlots","extensionId","moduleDeps","getModuleDependencies","module","typeDefs","resolvers","schemaDirectives","session","verb","headers","READ","set","extension","extensions","deps","getDependencies","ids","dep","id","Array","entries","depId","provider","loggerFactory","createLogger","GraphqlAspect","graphqlMain","Slot","withType","MainRuntime","LoggerAspect","addRuntime"],"sources":["graphql.main.runtime.ts"],"sourcesContent":["import { mergeSchemas } from '@graphql-tools/schema';\nimport NoIntrospection from 'graphql-disable-introspection';\nimport { GraphQLModule } from '@graphql-modules/core';\nimport { MainRuntime } from '@teambit/cli';\nimport { Harmony, Slot, SlotRegistry } from '@teambit/harmony';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport express, { Express } from 'express';\nimport { graphqlHTTP } from 'express-graphql';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { execute, subscribe } from 'graphql';\nimport { PubSubEngine, PubSub } from 'graphql-subscriptions';\nimport { createServer, Server } from 'http';\nimport httpProxy from 'http-proxy';\nimport { SubscriptionServer } from 'subscriptions-transport-ws';\nimport cors from 'cors';\nimport { GraphQLServer } from './graphql-server';\nimport { createRemoteSchemas } from './create-remote-schemas';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { Schema } from './schema';\n\nexport enum Verb {\n WRITE = 'write',\n READ = 'read',\n}\n\nexport type GraphQLConfig = {\n port: number;\n subscriptionsPortRange: number[];\n subscriptionsPath: string;\n disableCors?: boolean;\n};\n\nexport type GraphQLServerSlot = SlotRegistry<GraphQLServer>;\n\nexport type SchemaSlot = SlotRegistry<Schema>;\n\nexport type PubSubSlot = SlotRegistry<PubSubEngine>;\n\nexport type GraphQLServerOptions = {\n schemaSlot?: SchemaSlot;\n app?: Express;\n graphiql?: boolean;\n disableIntrospection?: boolean;\n remoteSchemas?: GraphQLServer[];\n subscriptionsPortRange?: number[];\n onWsConnect?: Function;\n};\n\nexport class GraphqlMain {\n constructor(\n /**\n * extension config\n */\n readonly config: GraphQLConfig,\n\n /**\n * slot for registering graphql modules\n */\n private moduleSlot: SchemaSlot,\n\n /**\n * harmony context.\n */\n private context: Harmony,\n\n /**\n * logger extension.\n */\n readonly logger: Logger,\n\n private graphQLServerSlot: GraphQLServerSlot,\n\n /**\n * graphql pubsub. allows to emit events to clients.\n */\n private pubSubSlot: PubSubSlot\n ) {}\n\n get pubsub(): PubSubEngine {\n const pubSubSlots = this.pubSubSlot.values();\n if (pubSubSlots.length) return pubSubSlots[0];\n return new PubSub();\n }\n\n private modules = new Map<string, GraphQLModule>();\n\n /**\n * returns the schema for a specific aspect by its id.\n */\n getSchema(aspectId: string) {\n return this.moduleSlot.get(aspectId);\n }\n\n /**\n * get multiple schema by aspect ids.\n */\n getSchemas(aspectIds: string[]) {\n return this.moduleSlot\n .toArray()\n .filter(([aspectId]) => {\n return aspectIds.includes(aspectId);\n })\n .map(([, schema]) => {\n return schema;\n });\n }\n\n async createServer(options: GraphQLServerOptions) {\n const { graphiql = true, disableIntrospection } = options;\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // TODO: @guy please consider to refactor to express extension.\n const app = options.app || express();\n if (!this.config.disableCors) {\n app.use(\n // @ts-ignore todo: it's not clear what's the issue.\n cors({\n origin(origin, callback) {\n callback(null, true);\n },\n credentials: true,\n })\n );\n }\n\n app.use(\n '/graphql',\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n graphqlHTTP((request, res, params) => ({\n customFormatErrorFn: (err) => {\n this.logger.error('graphql got an error during running the following query:', params);\n this.logger.error('graphql error ', err);\n return Object.assign(err, {\n // @ts-ignore\n ERR_CODE: err?.originalError?.errors?.[0].ERR_CODE || err.originalError?.constructor?.name,\n // @ts-ignore\n HTTP_CODE: err?.originalError?.errors?.[0].HTTP_CODE || err.originalError?.code,\n });\n },\n schema,\n rootValue: request,\n graphiql,\n validationRules: disableIntrospection ? [NoIntrospection] : undefined,\n }))\n );\n\n const server = createServer(app);\n const subscriptionsPort = options.subscriptionsPortRange || this.config.subscriptionsPortRange;\n const subscriptionServerPort = await this.getPort(subscriptionsPort);\n const { port } = await this.createSubscription(options, subscriptionServerPort);\n this.proxySubscription(server, port);\n\n return server;\n }\n\n /**\n * register a new graphql server.\n */\n registerServer(server: GraphQLServer) {\n this.graphQLServerSlot.register(server);\n return this;\n }\n\n /**\n * register a pubsub client\n */\n registerPubSub(pubsub: PubSubEngine) {\n const pubSubSlots = this.pubSubSlot.toArray();\n if (pubSubSlots.length) throw new Error('can not register more then one pubsub provider');\n this.pubSubSlot.register(pubsub);\n return this;\n }\n\n /**\n * start a graphql server.\n */\n async listen(port?: number, server?: Server, app?: Express) {\n const serverPort = port || this.config.port;\n const subServer = server || (await this.createServer({ app }));\n\n subServer.listen(serverPort, () => {\n this.logger.info(`API Server over HTTP is now running on http://localhost:${serverPort}`);\n this.logger.info(\n `API Server over web socket with subscriptions is now running on ws://localhost:${serverPort}/${this.config.subscriptionsPath}`\n );\n });\n }\n\n /**\n * register a new graphql module.\n */\n register(schema: Schema) {\n // const module = new GraphQLModule(schema);\n this.moduleSlot.register(schema);\n return this;\n }\n\n private async getPort(range: number[]) {\n const [from, to] = range;\n return Port.getPort(from, to);\n }\n\n /** create Subscription server with different port */\n\n private async createSubscription(options: GraphQLServerOptions, port: number) {\n // Create WebSocket listener server\n const websocketServer = createServer((request, response) => {\n response.writeHead(404);\n response.end();\n });\n\n // Bind it to port and start listening\n websocketServer.listen(port, () =>\n this.logger.debug(`Websocket Server is now running on http://localhost:${port}`)\n );\n\n const localSchema = this.createRootModule(options.schemaSlot);\n const remoteSchemas = await createRemoteSchemas(options.remoteSchemas || this.graphQLServerSlot.values());\n const schemas = [localSchema.schema].concat(remoteSchemas).filter((x) => x);\n const schema = mergeSchemas({\n schemas,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const subServer = new SubscriptionServer(\n {\n execute,\n subscribe,\n schema,\n onConnect: options.onWsConnect,\n },\n {\n server: websocketServer,\n path: this.config.subscriptionsPath,\n }\n );\n return { subServer, port };\n }\n /** proxy ws Subscription server to avoid conflict with different websocket connections */\n\n private proxySubscription(server: Server, port: number) {\n const proxServer = httpProxy.createProxyServer();\n const subscriptionsPath = this.config.subscriptionsPath;\n server.on('upgrade', function (req, socket, head) {\n if (req.url === subscriptionsPath) {\n proxServer.ws(req, socket, head, { target: { host: 'localhost', port } });\n }\n });\n }\n\n private createRootModule(schemaSlot?: SchemaSlot) {\n const modules = this.buildModules(schemaSlot);\n\n return new GraphQLModule({\n imports: modules,\n });\n }\n\n private buildModules(schemaSlot?: SchemaSlot) {\n const schemaSlots = schemaSlot ? schemaSlot.toArray() : this.moduleSlot.toArray();\n return schemaSlots.map(([extensionId, schema]) => {\n const moduleDeps = this.getModuleDependencies(extensionId);\n\n const module = new GraphQLModule({\n typeDefs: schema.typeDefs,\n resolvers: schema.resolvers,\n schemaDirectives: schema.schemaDirectives,\n imports: moduleDeps,\n context: (session) => {\n return {\n ...session,\n verb: session?.headers?.['x-verb'] || Verb.READ,\n };\n },\n });\n\n this.modules.set(extensionId, module);\n\n return module;\n });\n }\n\n private getModuleDependencies(extensionId: string): GraphQLModule[] {\n const extension = this.context.extensions.get(extensionId);\n if (!extension) throw new Error(`aspect ${extensionId} was not found`);\n const deps = this.context.getDependencies(extension);\n const ids = deps.map((dep) => dep.id);\n\n // @ts-ignore check :TODO why types are breaking here.\n return Array.from(this.modules.entries())\n .map(([depId, module]) => {\n const dep = ids.includes(depId);\n if (!dep) return undefined;\n return module;\n })\n .filter((module) => !!module);\n }\n\n static slots = [Slot.withType<Schema>(), Slot.withType<GraphQLServer>(), Slot.withType<PubSubSlot>()];\n\n static defaultConfig = {\n port: 4000,\n subscriptionsPortRange: [2000, 2100],\n disableCors: false,\n subscriptionsPath: '/subscriptions',\n };\n\n static runtime = MainRuntime;\n static dependencies = [LoggerAspect];\n\n static async provider(\n [loggerFactory]: [LoggerMain],\n config: GraphQLConfig,\n [moduleSlot, graphQLServerSlot, pubSubSlot]: [SchemaSlot, GraphQLServerSlot, PubSubSlot],\n context: Harmony\n ) {\n const logger = loggerFactory.createLogger(GraphqlAspect.id);\n const graphqlMain = new GraphqlMain(config, moduleSlot, context, logger, graphQLServerSlot, pubSubSlot);\n return graphqlMain;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlMain);\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,6BAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,4BAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,MAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,KAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,IAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA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xQjBmB,WAAW,kBAyQA,CAAC2I,sBAAY,CAAC;AActCL,yBAAa,CAACM,UAAU,CAAC5I,WAAW,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_client","_ws","_error","_crossFetch","_createLink","_graphqlProvider","_graphql","_renderLifecycle","_logging","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","GraphqlUI","constructor","client","children","createElement","GraphQLProvider","GraphqlRenderPlugins","createClient","uri","state","subscriptionUri","ApolloClient","link","createLink","cache","createCache","createSsrClient","serverUrl","headers","ApolloLink","from","onError","logError","createHttpLink","credentials","fetch","crossFetch","ssrMode","InMemoryCache","restore","httpLink","HttpLink","subsLink","WebSocketLink","options","reconnect","undefined","hybridLink","createSplitLink","errorLogger","provider","graphqlUI","exports","UIRuntime","GraphqlAspect","addRuntime"],"sources":["graphql.ui.runtime.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { UIRuntime } from '@teambit/ui';\n\nimport { InMemoryCache, ApolloClient, ApolloLink, HttpLink, createHttpLink } from '@apollo/client';\nimport type { NormalizedCacheObject } from '@apollo/client';\nimport { WebSocketLink } from '@apollo/client/link/ws';\nimport { onError } from '@apollo/client/link/error';\n\nimport crossFetch from 'cross-fetch';\n\nimport { createSplitLink } from './create-link';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { GraphqlRenderPlugins } from './render-lifecycle';\nimport { logError } from './logging';\n\n/**\n * Type of gql client.\n * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly\n * */\nexport type GraphQLClient<T> = ApolloClient<T>;\n\ntype ClientOptions = {\n /** Preset in-memory cache with state (e.g. continue state from SSR) */\n state?: NormalizedCacheObject;\n /** endpoint for websocket connections */\n subscriptionUri?: string;\n};\n\nexport class GraphqlUI {\n createClient(uri: string, { state, subscriptionUri }: ClientOptions = {}) {\n const client = new ApolloClient({\n link: this.createLink(uri, { subscriptionUri }),\n cache: this.createCache({ state }),\n });\n\n return client;\n }\n\n createSsrClient({ serverUrl, headers }: { serverUrl: string; headers: any }) {\n const link = ApolloLink.from([\n onError(logError),\n createHttpLink({\n credentials: 'include',\n uri: serverUrl,\n headers,\n fetch: crossFetch,\n }),\n ]);\n\n const client = new ApolloClient({\n ssrMode: true,\n link,\n cache: this.createCache(),\n });\n\n return client;\n }\n\n private createCache({ state }: { state?: NormalizedCacheObject } = {}) {\n const cache = new InMemoryCache();\n\n if (state) cache.restore(state);\n\n return cache;\n }\n\n private createLink(uri: string, { subscriptionUri }: { subscriptionUri?: string } = {}) {\n const httpLink = new HttpLink({ credentials: 'include', uri });\n const subsLink = subscriptionUri\n ? new WebSocketLink({\n uri: subscriptionUri,\n options: { reconnect: true },\n })\n : undefined;\n\n const hybridLink = subsLink ? createSplitLink(httpLink, subsLink) : httpLink;\n const errorLogger = onError(logError);\n\n return ApolloLink.from([errorLogger, hybridLink]);\n }\n\n /**\n * get the graphQL provider\n */\n getProvider = ({ client, children }: { client: GraphQLClient<any>; children: ReactNode }) => {\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n };\n\n readonly renderPlugins = new GraphqlRenderPlugins(this);\n\n static runtime = UIRuntime;\n static dependencies = [];\n static slots = [];\n\n static async provider() {\n const graphqlUI = new GraphqlUI();\n\n return graphqlUI;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,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B,CAAC,CAAC,GACFC,SAAS;IAEb,MAAMC,UAAU,GAAGL,QAAQ,GAAG,IAAAM,6BAAe,EAACR,QAAQ,EAAEE,QAAQ,CAAC,GAAGF,QAAQ;IAC5E,MAAMS,WAAW,GAAG,IAAAlB,gBAAO,EAACC,mBAAQ,CAAC;IAErC,OAAOH,oBAAU,CAACC,IAAI,CAAC,CAACmB,WAAW,EAAEF,UAAU,CAAC,CAAC;EACnD;EAeA,aAAaG,QAAQA,CAAA,EAAG;IACtB,MAAMC,SAAS,GAAG,IAAIzC,SAAS,CAAC,CAAC;IAEjC,OAAOyC,SAAS;EAClB;AACF;AAACC,OAAA,CAAA1C,SAAA,GAAAA,SAAA;AAAApB,eAAA,CAvEYoB,SAAS,aA8DH2C,eAAS;AAAA/D,eAAA,CA9DfoB,SAAS,kBA+DE,EAAE;AAAApB,eAAA,CA/DboB,SAAS,WAgEL,EAAE;AASnB4C,wBAAa,CAACC,UAAU,CAAC7C,SAAS,CAAC"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_client","_ws","_error","_crossFetch","_createLink","_graphqlProvider","_graphql","_renderLifecycle","_logging","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","GraphqlUI","constructor","client","children","createElement","GraphQLProvider","GraphqlRenderPlugins","createClient","uri","state","subscriptionUri","ApolloClient","link","createLink","cache","createCache","createSsrClient","serverUrl","headers","ApolloLink","from","onError","logError","createHttpLink","credentials","fetch","crossFetch","ssrMode","InMemoryCache","restore","httpLink","HttpLink","subsLink","WebSocketLink","options","reconnect","undefined","hybridLink","createSplitLink","errorLogger","provider","graphqlUI","exports","UIRuntime","GraphqlAspect","addRuntime"],"sources":["graphql.ui.runtime.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { UIRuntime } from '@teambit/ui';\n\nimport { InMemoryCache, ApolloClient, ApolloLink, HttpLink, createHttpLink } from '@apollo/client';\nimport type { NormalizedCacheObject } from '@apollo/client';\nimport { WebSocketLink } from '@apollo/client/link/ws';\nimport { onError } from '@apollo/client/link/error';\n\nimport crossFetch from 'cross-fetch';\n\nimport { createSplitLink } from './create-link';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\nimport { GraphqlRenderPlugins } from './render-lifecycle';\nimport { logError } from './logging';\n\n/**\n * Type of gql client.\n * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly\n * */\nexport type GraphQLClient<T> = ApolloClient<T>;\n\ntype ClientOptions = {\n /** Preset in-memory cache with state (e.g. continue state from SSR) */\n state?: NormalizedCacheObject;\n /** endpoint for websocket connections */\n subscriptionUri?: string;\n};\n\nexport class GraphqlUI {\n createClient(uri: string, { state, subscriptionUri }: ClientOptions = {}) {\n const client = new ApolloClient({\n link: this.createLink(uri, { subscriptionUri }),\n cache: this.createCache({ state }),\n });\n\n return client;\n }\n\n createSsrClient({ serverUrl, headers }: { serverUrl: string; headers: any }) {\n const link = ApolloLink.from([\n onError(logError),\n createHttpLink({\n credentials: 'include',\n uri: serverUrl,\n headers,\n fetch: crossFetch,\n }),\n ]);\n\n const client = new ApolloClient({\n ssrMode: true,\n link,\n cache: this.createCache(),\n });\n\n return client;\n }\n\n private createCache({ state }: { state?: NormalizedCacheObject } = {}) {\n const cache = new InMemoryCache();\n\n if (state) cache.restore(state);\n\n return cache;\n }\n\n private createLink(uri: string, { subscriptionUri }: { subscriptionUri?: string } = {}) {\n const httpLink = new HttpLink({ credentials: 'include', uri });\n const subsLink = subscriptionUri\n ? new WebSocketLink({\n uri: subscriptionUri,\n options: { reconnect: true },\n })\n : undefined;\n\n const hybridLink = subsLink ? createSplitLink(httpLink, subsLink) : httpLink;\n const errorLogger = onError(logError);\n\n return ApolloLink.from([errorLogger, hybridLink]);\n }\n\n /**\n * get the graphQL provider\n */\n getProvider = ({ client, children }: { client: GraphQLClient<any>; children: ReactNode }) => {\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n };\n\n readonly renderPlugins = new GraphqlRenderPlugins(this);\n\n static runtime = UIRuntime;\n static dependencies = [];\n static slots = [];\n\n static async provider() {\n const graphqlUI = new GraphqlUI();\n\n return graphqlUI;\n }\n}\n\nGraphqlAspect.addRuntime(GraphqlUI);\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,IAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,GAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,IAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,GAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,OAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAK,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,YAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,WAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,iBAAA;EAAA,MAAAT,IAAA,GAAAE,OAAA;EAAAO,gBAA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,CAAC,GAAG,CAAC,CAAC,EAAE;IACrE,MAAMK,KAAK,GAAG,KAAIc,uBAAa,EAAC,CAAC;IAEjC,IAAInB,KAAK,EAAEK,KAAK,CAACe,OAAO,CAACpB,KAAK,CAAC;IAE/B,OAAOK,KAAK;EACd;EAEQD,UAAUA,CAACL,GAAW,EAAE;IAAEE;EAA8C,CAAC,GAAG,CAAC,CAAC,EAAE;IACtF,MAAMoB,QAAQ,GAAG,KAAIC,kBAAQ,EAAC;MAAEP,WAAW,EAAE,SAAS;MAAEhB;IAAI,CAAC,CAAC;IAC9D,MAAMwB,QAAQ,GAAGtB,eAAe,GAC5B,KAAIuB,mBAAa,EAAC;MAChBzB,GAAG,EAAEE,eAAe;MACpBwB,OAAO,EAAE;QAAEC,SAAS,EAAE;MAAK;IAC7B,CAAC,CAAC,GACFC,SAAS;IAEb,MAAMC,UAAU,GAAGL,QAAQ,GAAG,IAAAM,6BAAe,EAACR,QAAQ,EAAEE,QAAQ,CAAC,GAAGF,QAAQ;IAC5E,MAAMS,WAAW,GAAG,IAAAlB,gBAAO,EAACC,mBAAQ,CAAC;IAErC,OAAOH,oBAAU,CAACC,IAAI,CAAC,CAACmB,WAAW,EAAEF,UAAU,CAAC,CAAC;EACnD;EAeA,aAAaG,QAAQA,CAAA,EAAG;IACtB,MAAMC,SAAS,GAAG,IAAIzC,SAAS,CAAC,CAAC;IAEjC,OAAOyC,SAAS;EAClB;AACF;AAACC,OAAA,CAAA1C,SAAA,GAAAA,SAAA;AAAApB,eAAA,CAvEYoB,SAAS,aA8DH2C,eAAS;AAAA/D,eAAA,CA9DfoB,SAAS,kBA+DE,EAAE;AAAApB,eAAA,CA/DboB,SAAS,WAgEL,EAAE;AASnB4C,wBAAa,CAACC,UAAU,CAAC7C,SAAS,CAAC","ignoreList":[]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_graphql","data","require","_graphqlProvider","_graphqlError"],"sources":["index.ts"],"sourcesContent":["export { GraphqlAspect, GraphqlAspect as default } from './graphql.aspect';\n\nexport type { Schema } from './schema';\nexport type { GraphqlMain, SchemaSlot } from './graphql.main.runtime';\nexport type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';\nexport type { GraphQLServer } from './graphql-server';\nexport { GraphQLProvider } from './graphql-provider';\nexport { GraphQlError } from './graphql-error';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAE,iBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
1
+ {"version":3,"names":["_graphql","data","require","_graphqlProvider","_graphqlError"],"sources":["index.ts"],"sourcesContent":["export { GraphqlAspect, GraphqlAspect as default } from './graphql.aspect';\n\nexport type { Schema } from './schema';\nexport type { GraphqlMain, SchemaSlot } from './graphql.main.runtime';\nexport type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';\nexport type { GraphQLServer } from './graphql-server';\nexport { GraphQLProvider } from './graphql-provider';\nexport { GraphQlError } from './graphql-error';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAMA,SAAAE,iBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["logError","graphQLErrors","networkError","operation","forEach","message","locations","path","console","error","operationName"],"sources":["logging.ts"],"sourcesContent":["import { ErrorResponse } from '@apollo/client/link/error';\n\nexport function logError({ graphQLErrors, networkError, operation }: ErrorResponse) {\n if (graphQLErrors)\n graphQLErrors.forEach(({ message, locations, path }) =>\n // eslint-disable-next-line no-console\n console.error(`[gql] error on \"${operation.operationName}\" - \"${message}\"`, locations, path)\n );\n\n // eslint-disable-next-line no-console\n if (networkError) console.error('[gql] network error', `\"${operation.operationName}\"`, networkError);\n}\n\n// // // a fetch monkey patch with logs. useful to debug gql\n// function loggingCrossFetch(...p: Parameters<typeof fetch>) {\n// const [url, init] = p;\n// const headers = init?.headers;\n// const body = init?.body;\n\n// console.debug('[gql]', 'fetching', url, body, { headers });\n// const promise = crossFetch(...p);\n// promise\n// .then((result) => console.debug('[gql]', 'finished', result))\n// .catch((err) => console.debug('[gql]', 'error', err));\n// return promise;\n// }\n"],"mappings":";;;;;;AAEO,SAASA,QAAQA,CAAC;EAAEC,aAAa;EAAEC,YAAY;EAAEC;AAAyB,CAAC,EAAE;EAClF,IAAIF,aAAa,EACfA,aAAa,CAACG,OAAO,CAAC,CAAC;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAAK,CAAC;EACjD;EACAC,OAAO,CAACC,KAAK,CAAE,mBAAkBN,SAAS,CAACO,aAAc,QAAOL,OAAQ,GAAE,EAAEC,SAAS,EAAEC,IAAI,CAC7F,CAAC;;EAEH;EACA,IAAIL,YAAY,EAAEM,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAG,IAAGN,SAAS,CAACO,aAAc,GAAE,EAAER,YAAY,CAAC;AACtG;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA"}
1
+ {"version":3,"names":["logError","graphQLErrors","networkError","operation","forEach","message","locations","path","console","error","operationName"],"sources":["logging.ts"],"sourcesContent":["import { ErrorResponse } from '@apollo/client/link/error';\n\nexport function logError({ graphQLErrors, networkError, operation }: ErrorResponse) {\n if (graphQLErrors)\n graphQLErrors.forEach(({ message, locations, path }) =>\n // eslint-disable-next-line no-console\n console.error(`[gql] error on \"${operation.operationName}\" - \"${message}\"`, locations, path)\n );\n\n // eslint-disable-next-line no-console\n if (networkError) console.error('[gql] network error', `\"${operation.operationName}\"`, networkError);\n}\n\n// // // a fetch monkey patch with logs. useful to debug gql\n// function loggingCrossFetch(...p: Parameters<typeof fetch>) {\n// const [url, init] = p;\n// const headers = init?.headers;\n// const body = init?.body;\n\n// console.debug('[gql]', 'fetching', url, body, { headers });\n// const promise = crossFetch(...p);\n// promise\n// .then((result) => console.debug('[gql]', 'finished', result))\n// .catch((err) => console.debug('[gql]', 'error', err));\n// return promise;\n// }\n"],"mappings":";;;;;;AAEO,SAASA,QAAQA,CAAC;EAAEC,aAAa;EAAEC,YAAY;EAAEC;AAAyB,CAAC,EAAE;EAClF,IAAIF,aAAa,EACfA,aAAa,CAACG,OAAO,CAAC,CAAC;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAAK,CAAC;EACjD;EACAC,OAAO,CAACC,KAAK,CAAE,mBAAkBN,SAAS,CAACO,aAAc,QAAOL,OAAQ,GAAE,EAAEC,SAAS,EAAEC,IAAI,CAC7F,CAAC;;EAEH;EACA,IAAIL,YAAY,EAAEM,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAG,IAAGN,SAAS,CAACO,aAAc,GAAE,EAAER,YAAY,CAAC;AACtG;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.harmony_graphql@1.0.189/dist/graphql.composition.js';
2
+ import * as overview_0 from '/Users/giladshoham/Library/Caches/Bit/capsules/root/b5ea46ec36fa42b9dbedfc12ecb7bb63e03fcfe6/teambit.harmony_graphql@1.0.189/dist/graphql.docs.mdx';
3
+
4
+ export const compositions = [compositions_0];
5
+ export const overview = [overview_0];
6
+
7
+ export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_ssr","_server","_lodash","_uiFoundationUi","_graphqlProvider","_graphql","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","ALLOWED_HEADERS","GraphqlRenderPlugins","constructor","graphqlUI","GraphqlAspect","id","browser","port","location","serverUrl","client","createSsrClient","headers","pick","ctx","app","getMarkupFromTree","tree","renderFunction","ReactDOMServer","renderToStaticMarkup","undefined","json","JSON","stringify","extract","raw","state","parse","console","error","window","isInsecure","protocol","wsUrl","host","createClient","subscriptionUri","_client","renderCtx","children","createElement","getProvider","isBrowser","BrowserGqlProvider","ServerGqlProvider","getClient","browserInit","exports","GraphQLProvider"],"sources":["render-lifecycle.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n// Calling getMarkupFromTree instead of getDataFromTree so we can control the render function\n// This is required since upgrade to @apollo/client v3.6.9 because otherwise the ssr is not working since\n// webpack is not bundling the react-dom/server\nimport { getMarkupFromTree } from '@apollo/client/react/ssr';\nimport ReactDOMServer from 'react-dom/server';\nimport type { ApolloClient, NormalizedCacheObject } from '@apollo/client';\nimport pick from 'lodash.pick';\n\nimport { isBrowser } from '@teambit/ui-foundation.ui.is-browser';\nimport type { SSR } from '@teambit/ui';\n\nimport type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\n\ntype RenderContext = {\n client: GraphQLClient<any>;\n};\n\nconst ALLOWED_HEADERS = ['cookie'];\n\nexport class GraphqlRenderPlugins implements SSR.RenderPlugin<RenderContext, { state?: NormalizedCacheObject }> {\n constructor(private graphqlUI: GraphqlUI) {}\n\n key = GraphqlAspect.id;\n\n serverInit = ({ browser }: SSR.SsrSession) => {\n const port = browser?.location.port || 3000;\n const serverUrl = `http://localhost:${port}/graphql`;\n\n const client = this.graphqlUI.createSsrClient({\n serverUrl,\n headers: pick(browser?.headers, ALLOWED_HEADERS),\n });\n\n const ctx: RenderContext = { client };\n return ctx;\n };\n\n /**\n * Eagerly and recursively execute all gql queries in the app.\n * Data will be available in gqlClient.extract()\n */\n onBeforeRender = async (ctx: RenderContext, app: ReactNode) => {\n await getMarkupFromTree({ tree: app, renderFunction: ReactDOMServer.renderToStaticMarkup });\n };\n\n serialize = (ctx?: RenderContext) => {\n const client = ctx?.client;\n if (!client) return undefined;\n\n return {\n json: JSON.stringify(client.extract()),\n };\n };\n\n deserialize = (raw?: string) => {\n if (!raw) return { state: undefined };\n let state: NormalizedCacheObject | undefined;\n try {\n state = JSON.parse(raw);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('[GraphQL] failed deserializing state from DOM', e);\n }\n\n return { state };\n };\n\n private _client: ApolloClient<NormalizedCacheObject> | undefined = undefined;\n\n browserInit = ({ state }: { state?: NormalizedCacheObject } = {}) => {\n const { location } = window;\n const isInsecure = location.protocol === 'http:';\n const wsUrl = `${isInsecure ? 'ws:' : 'wss:'}//${location.host}/subscriptions`;\n\n const client = this.graphqlUI.createClient('/graphql', { state, subscriptionUri: wsUrl });\n this._client = client;\n\n return { client };\n };\n\n getClient() {\n if (!this._client) return this.browserInit().client;\n return this._client;\n }\n\n private BrowserGqlProvider = ({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) => {\n if (!renderCtx?.client) throw new TypeError('GQL client is not initialized, make sure `.browserInit()` executes');\n\n return <this.graphqlUI.getProvider client={renderCtx?.client}>{children}</this.graphqlUI.getProvider>;\n };\n\n reactContext = isBrowser ? this.BrowserGqlProvider : ServerGqlProvider;\n}\n\nfunction ServerGqlProvider({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) {\n if (!renderCtx?.client)\n throw new TypeError('GQL client has not been initialized during SSR, make sure `.serverInit()` executes');\n\n const { client } = renderCtx;\n return <GraphQLProvider client={client}>{children}</GraphQLProvider>;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,gBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,eAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAO,iBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,gBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAR,IA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C,MAAM,EAAEA;EAAO,GAAE8B,QAA0B,CAAC;AACtE"}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ssr","_server","_lodash","_uiFoundationUi","_graphqlProvider","_graphql","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","ALLOWED_HEADERS","GraphqlRenderPlugins","constructor","graphqlUI","GraphqlAspect","id","browser","port","location","serverUrl","client","createSsrClient","headers","pick","ctx","app","getMarkupFromTree","tree","renderFunction","ReactDOMServer","renderToStaticMarkup","undefined","json","JSON","stringify","extract","raw","state","parse","console","error","window","isInsecure","protocol","wsUrl","host","createClient","subscriptionUri","_client","renderCtx","children","createElement","getProvider","isBrowser","BrowserGqlProvider","ServerGqlProvider","getClient","browserInit","exports","GraphQLProvider"],"sources":["render-lifecycle.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n// Calling getMarkupFromTree instead of getDataFromTree so we can control the render function\n// This is required since upgrade to @apollo/client v3.6.9 because otherwise the ssr is not working since\n// webpack is not bundling the react-dom/server\nimport { getMarkupFromTree } from '@apollo/client/react/ssr';\nimport ReactDOMServer from 'react-dom/server';\nimport type { ApolloClient, NormalizedCacheObject } from '@apollo/client';\nimport pick from 'lodash.pick';\n\nimport { isBrowser } from '@teambit/ui-foundation.ui.is-browser';\nimport type { SSR } from '@teambit/ui';\n\nimport type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';\nimport { GraphQLProvider } from './graphql-provider';\nimport { GraphqlAspect } from './graphql.aspect';\n\ntype RenderContext = {\n client: GraphQLClient<any>;\n};\n\nconst ALLOWED_HEADERS = ['cookie'];\n\nexport class GraphqlRenderPlugins implements SSR.RenderPlugin<RenderContext, { state?: NormalizedCacheObject }> {\n constructor(private graphqlUI: GraphqlUI) {}\n\n key = GraphqlAspect.id;\n\n serverInit = ({ browser }: SSR.SsrSession) => {\n const port = browser?.location.port || 3000;\n const serverUrl = `http://localhost:${port}/graphql`;\n\n const client = this.graphqlUI.createSsrClient({\n serverUrl,\n headers: pick(browser?.headers, ALLOWED_HEADERS),\n });\n\n const ctx: RenderContext = { client };\n return ctx;\n };\n\n /**\n * Eagerly and recursively execute all gql queries in the app.\n * Data will be available in gqlClient.extract()\n */\n onBeforeRender = async (ctx: RenderContext, app: ReactNode) => {\n await getMarkupFromTree({ tree: app, renderFunction: ReactDOMServer.renderToStaticMarkup });\n };\n\n serialize = (ctx?: RenderContext) => {\n const client = ctx?.client;\n if (!client) return undefined;\n\n return {\n json: JSON.stringify(client.extract()),\n };\n };\n\n deserialize = (raw?: string) => {\n if (!raw) return { state: undefined };\n let state: NormalizedCacheObject | undefined;\n try {\n state = JSON.parse(raw);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('[GraphQL] failed deserializing state from DOM', e);\n }\n\n return { state };\n };\n\n private _client: ApolloClient<NormalizedCacheObject> | undefined = undefined;\n\n browserInit = ({ state }: { state?: NormalizedCacheObject } = {}) => {\n const { location } = window;\n const isInsecure = location.protocol === 'http:';\n const wsUrl = `${isInsecure ? 'ws:' : 'wss:'}//${location.host}/subscriptions`;\n\n const client = this.graphqlUI.createClient('/graphql', { state, subscriptionUri: wsUrl });\n this._client = client;\n\n return { client };\n };\n\n getClient() {\n if (!this._client) return this.browserInit().client;\n return this._client;\n }\n\n private BrowserGqlProvider = ({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) => {\n if (!renderCtx?.client) throw new TypeError('GQL client is not initialized, make sure `.browserInit()` executes');\n\n return <this.graphqlUI.getProvider client={renderCtx?.client}>{children}</this.graphqlUI.getProvider>;\n };\n\n reactContext = isBrowser ? this.BrowserGqlProvider : ServerGqlProvider;\n}\n\nfunction ServerGqlProvider({ renderCtx, children }: { renderCtx?: RenderContext; children: ReactNode }) {\n if (!renderCtx?.client)\n throw new TypeError('GQL client has not been initialized during SSR, make sure `.serverInit()` executes');\n\n const { client } = renderCtx;\n return <GraphQL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MACzF,IAAI,CAACI,OAAO,GAAG5B,MAAM;MAErB,OAAO;QAAEA;MAAO,CAAC;IACnB,CAAC;IAAA9B,eAAA,6BAO4B,CAAC;MAAE2D,SAAS;MAAEC;IAA6D,CAAC,KAAK;MAC5G,IAAI,CAACD,SAAS,EAAE7B,MAAM,EAAE,MAAM,IAAIZ,SAAS,CAAC,oEAAoE,CAAC;MAEjH,oBAAO/B,MAAA,GAAAY,OAAA,CAAA8D,aAAA,MAAMtC,SAAS,CAACuC,WAAW;QAAChC,MAAM,EAAE6B,SAAS,EAAE7B;MAAO,GAAE8B,QAAqC,CAAC;IACvG,CAAC;IAAA5D,eAAA,uBAEc+D,2BAAS,GAAG,IAAI,CAACC,kBAAkB,GAAGC,iBAAiB;EAvE3B;EA4D3CC,SAASA,CAAA,EAAG;IACV,IAAI,CAAC,IAAI,CAACR,OAAO,EAAE,OAAO,IAAI,CAACS,WAAW,CAAC,CAAC,CAACrC,MAAM;IACnD,OAAO,IAAI,CAAC4B,OAAO;EACrB;AASF;AAACU,OAAA,CAAA/C,oBAAA,GAAAA,oBAAA;AAED,SAAS4C,iBAAiBA,CAAC;EAAEN,SAAS;EAAEC;AAA6D,CAAC,EAAE;EACtG,IAAI,CAACD,SAAS,EAAE7B,MAAM,EACpB,MAAM,IAAIZ,SAAS,CAAC,oFAAoF,CAAC;EAE3G,MAAM;IAAEY;EAAO,CAAC,GAAG6B,SAAS;EAC5B,oBAAOxE,MAAA,GAAAY,OAAA,CAAA8D,aAAA,CAAClE,gBAAA,GAAA0E,eAAe;IAACvC,MAAM,EAAEA;EAAO,GAAE8B,QAA0B,CAAC;AACtE","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["schema.ts"],"sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { SchemaDirectives } from '@graphql-modules/core';\n\n/**\n * graphql schema for an extension.\n */\nexport type Schema = {\n typeDefs?: string | DocumentNode;\n resolvers?: { [key: string]: any };\n schemaDirectives?: SchemaDirectives;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["schema.ts"],"sourcesContent":["import type { DocumentNode } from 'graphql';\nimport type { SchemaDirectives } from '@graphql-modules/core';\n\n/**\n * graphql schema for an extension.\n */\nexport type Schema = {\n typeDefs?: string | DocumentNode;\n resolvers?: { [key: string]: any };\n schemaDirectives?: SchemaDirectives;\n};\n"],"mappings":"","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graphql",
3
- "version": "1.0.187",
3
+ "version": "1.0.189",
4
4
  "homepage": "https://bit.cloud/teambit/harmony/graphql",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.harmony",
8
8
  "name": "graphql",
9
- "version": "1.0.187"
9
+ "version": "1.0.189"
10
10
  },
11
11
  "dependencies": {
12
12
  "@graphql-modules/core": "0.7.17",
@@ -32,10 +32,10 @@
32
32
  "bufferutil": "4.0.3",
33
33
  "@teambit/harmony": "0.4.6",
34
34
  "@teambit/ui-foundation.ui.is-browser": "0.0.500",
35
- "@teambit/cli": "0.0.855",
36
- "@teambit/logger": "0.0.948",
35
+ "@teambit/cli": "0.0.856",
36
+ "@teambit/logger": "0.0.949",
37
37
  "@teambit/toolbox.network.get-port": "1.0.6",
38
- "@teambit/ui": "1.0.187"
38
+ "@teambit/ui": "1.0.189"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/cors": "2.8.10",
@@ -44,7 +44,7 @@
44
44
  "@types/node-fetch": "2.5.12",
45
45
  "@types/mocha": "9.1.0",
46
46
  "chai": "4.3.0",
47
- "@teambit/harmony.envs.core-aspect-env": "0.0.25"
47
+ "@teambit/harmony.envs.core-aspect-env": "0.0.27"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@apollo/client": "^3.6.0",
@@ -1,7 +0,0 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.187/dist/graphql.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.187/dist/graphql.docs.mdx';
3
-
4
- export const compositions = [compositions_0];
5
- export const overview = [overview_0];
6
-
7
- export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};