@teambit/graphql 1.0.227 → 1.0.229

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.227" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/graphql@1.0.229" 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={85076:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.227",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(85076);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={9159:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.229",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(9159);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": "{}",
@@ -1456,6 +1492,7 @@
1456
1492
  "character": 32
1457
1493
  },
1458
1494
  "name": "ApolloClient",
1495
+ "packageName": "@apollo/client",
1459
1496
  "typeArgs": [
1460
1497
  {
1461
1498
  "__schema": "TypeRefSchema",
@@ -1546,7 +1583,8 @@
1546
1583
  "line": 10,
1547
1584
  "character": 55
1548
1585
  },
1549
- "name": "GraphQLProviderProps"
1586
+ "name": "GraphQLProviderProps",
1587
+ "internalFilePath": "graphql-provider/graphql-provider.tsx"
1550
1588
  },
1551
1589
  "isOptional": false,
1552
1590
  "objectBindingNodes": [
@@ -1784,7 +1822,8 @@
1784
1822
  "line": 8,
1785
1823
  "character": 23
1786
1824
  },
1787
- "name": "DocumentNode"
1825
+ "name": "DocumentNode",
1826
+ "packageName": "graphql"
1788
1827
  }
1789
1828
  ]
1790
1829
  },
@@ -1864,7 +1903,8 @@
1864
1903
  "line": 10,
1865
1904
  "character": 22
1866
1905
  },
1867
- "name": "SchemaDirectives"
1906
+ "name": "SchemaDirectives",
1907
+ "packageName": "@graphql-modules/core"
1868
1908
  },
1869
1909
  "isOptional": true
1870
1910
  }
@@ -2041,6 +2081,11 @@
2041
2081
  "character": 33
2042
2082
  },
2043
2083
  "name": "SlotRegistry",
2084
+ "componentId": {
2085
+ "scope": "teambit.harmony",
2086
+ "name": "harmony",
2087
+ "version": "0.4.6"
2088
+ },
2044
2089
  "typeArgs": [
2045
2090
  {
2046
2091
  "__schema": "TypeRefSchema",
@@ -2071,6 +2116,11 @@
2071
2116
  "character": 26
2072
2117
  },
2073
2118
  "name": "SlotRegistry",
2119
+ "componentId": {
2120
+ "scope": "teambit.harmony",
2121
+ "name": "harmony",
2122
+ "version": "0.4.6"
2123
+ },
2074
2124
  "typeArgs": [
2075
2125
  {
2076
2126
  "__schema": "TypeRefSchema",
@@ -2101,6 +2151,11 @@
2101
2151
  "character": 26
2102
2152
  },
2103
2153
  "name": "SlotRegistry",
2154
+ "componentId": {
2155
+ "scope": "teambit.harmony",
2156
+ "name": "harmony",
2157
+ "version": "0.4.6"
2158
+ },
2104
2159
  "typeArgs": [
2105
2160
  {
2106
2161
  "__schema": "TypeRefSchema",
@@ -2109,7 +2164,8 @@
2109
2164
  "line": 37,
2110
2165
  "character": 39
2111
2166
  },
2112
- "name": "PubSubEngine"
2167
+ "name": "PubSubEngine",
2168
+ "packageName": "graphql-subscriptions"
2113
2169
  }
2114
2170
  ]
2115
2171
  }
@@ -2167,7 +2223,8 @@
2167
2223
  "line": 41,
2168
2224
  "character": 9
2169
2225
  },
2170
- "name": "Express"
2226
+ "name": "Express",
2227
+ "packageName": "express"
2171
2228
  },
2172
2229
  "isOptional": true
2173
2230
  },
@@ -2325,7 +2382,8 @@
2325
2382
  "line": 54,
2326
2383
  "character": 22
2327
2384
  },
2328
- "name": "GraphQLConfig"
2385
+ "name": "GraphQLConfig",
2386
+ "internalFilePath": "graphql.main.runtime.ts"
2329
2387
  },
2330
2388
  "isOptional": false,
2331
2389
  "isSpread": false
@@ -2365,7 +2423,12 @@
2365
2423
  "line": 64,
2366
2424
  "character": 22
2367
2425
  },
2368
- "name": "Harmony"
2426
+ "name": "Harmony",
2427
+ "componentId": {
2428
+ "scope": "teambit.harmony",
2429
+ "name": "harmony",
2430
+ "version": "0.4.6"
2431
+ }
2369
2432
  },
2370
2433
  "isOptional": false,
2371
2434
  "isSpread": false
@@ -2385,7 +2448,11 @@
2385
2448
  "line": 69,
2386
2449
  "character": 22
2387
2450
  },
2388
- "name": "Logger"
2451
+ "name": "Logger",
2452
+ "componentId": {
2453
+ "scope": "teambit.harmony",
2454
+ "name": "logger"
2455
+ }
2389
2456
  },
2390
2457
  "isOptional": false,
2391
2458
  "isSpread": false
@@ -2405,7 +2472,8 @@
2405
2472
  "line": 71,
2406
2473
  "character": 32
2407
2474
  },
2408
- "name": "GraphQLServerSlot"
2475
+ "name": "GraphQLServerSlot",
2476
+ "internalFilePath": "graphql.main.runtime.ts"
2409
2477
  },
2410
2478
  "isOptional": false,
2411
2479
  "isSpread": false
@@ -2425,7 +2493,8 @@
2425
2493
  "line": 76,
2426
2494
  "character": 25
2427
2495
  },
2428
- "name": "PubSubSlot"
2496
+ "name": "PubSubSlot",
2497
+ "internalFilePath": "graphql.main.runtime.ts"
2429
2498
  },
2430
2499
  "isOptional": false,
2431
2500
  "isSpread": false
@@ -2599,7 +2668,8 @@
2599
2668
  "line": 108,
2600
2669
  "character": 31
2601
2670
  },
2602
- "name": "GraphQLServerOptions"
2671
+ "name": "GraphQLServerOptions",
2672
+ "internalFilePath": "graphql.main.runtime.ts"
2603
2673
  },
2604
2674
  "isOptional": false,
2605
2675
  "isSpread": false
@@ -2705,7 +2775,8 @@
2705
2775
  "line": 172,
2706
2776
  "character": 26
2707
2777
  },
2708
- "name": "PubSubEngine"
2778
+ "name": "PubSubEngine",
2779
+ "packageName": "graphql-subscriptions"
2709
2780
  },
2710
2781
  "isOptional": false,
2711
2782
  "isSpread": false
@@ -2777,7 +2848,8 @@
2777
2848
  "line": 182,
2778
2849
  "character": 40
2779
2850
  },
2780
- "name": "Server"
2851
+ "name": "Server",
2852
+ "packageName": "http"
2781
2853
  },
2782
2854
  "isOptional": true,
2783
2855
  "isSpread": false
@@ -2797,7 +2869,8 @@
2797
2869
  "line": 182,
2798
2870
  "character": 54
2799
2871
  },
2800
- "name": "Express"
2872
+ "name": "Express",
2873
+ "packageName": "express"
2801
2874
  },
2802
2875
  "isOptional": true,
2803
2876
  "isSpread": false
@@ -2985,7 +3058,11 @@
2985
3058
  "line": 317,
2986
3059
  "character": 23
2987
3060
  },
2988
- "name": "LoggerMain"
3061
+ "name": "LoggerMain",
3062
+ "componentId": {
3063
+ "scope": "teambit.harmony",
3064
+ "name": "logger"
3065
+ }
2989
3066
  }
2990
3067
  ]
2991
3068
  },
@@ -3007,7 +3084,8 @@
3007
3084
  "line": 318,
3008
3085
  "character": 13
3009
3086
  },
3010
- "name": "GraphQLConfig"
3087
+ "name": "GraphQLConfig",
3088
+ "internalFilePath": "graphql.main.runtime.ts"
3011
3089
  },
3012
3090
  "isOptional": false,
3013
3091
  "isSpread": false
@@ -3044,7 +3122,8 @@
3044
3122
  "line": 319,
3045
3123
  "character": 63
3046
3124
  },
3047
- "name": "GraphQLServerSlot"
3125
+ "name": "GraphQLServerSlot",
3126
+ "internalFilePath": "graphql.main.runtime.ts"
3048
3127
  },
3049
3128
  {
3050
3129
  "__schema": "TypeRefSchema",
@@ -3053,7 +3132,8 @@
3053
3132
  "line": 319,
3054
3133
  "character": 82
3055
3134
  },
3056
- "name": "PubSubSlot"
3135
+ "name": "PubSubSlot",
3136
+ "internalFilePath": "graphql.main.runtime.ts"
3057
3137
  }
3058
3138
  ]
3059
3139
  },
@@ -3075,7 +3155,12 @@
3075
3155
  "line": 320,
3076
3156
  "character": 14
3077
3157
  },
3078
- "name": "Harmony"
3158
+ "name": "Harmony",
3159
+ "componentId": {
3160
+ "scope": "teambit.harmony",
3161
+ "name": "harmony",
3162
+ "version": "0.4.6"
3163
+ }
3079
3164
  },
3080
3165
  "isOptional": false,
3081
3166
  "isSpread": false
@@ -3160,6 +3245,7 @@
3160
3245
  "character": 32
3161
3246
  },
3162
3247
  "name": "ApolloClient",
3248
+ "packageName": "@apollo/client",
3163
3249
  "typeArgs": [
3164
3250
  {
3165
3251
  "__schema": "TypeRefSchema",
@@ -3228,7 +3314,8 @@
3228
3314
  "line": 31,
3229
3315
  "character": 57
3230
3316
  },
3231
- "name": "ClientOptions"
3317
+ "name": "ClientOptions",
3318
+ "internalFilePath": "graphql.ui.runtime.tsx"
3232
3319
  },
3233
3320
  "isOptional": true,
3234
3321
  "defaultValue": "{}",
@@ -3584,7 +3671,8 @@
3584
3671
  "line": 25,
3585
3672
  "character": 11
3586
3673
  },
3587
- "name": "NormalizedCacheObject"
3674
+ "name": "NormalizedCacheObject",
3675
+ "packageName": "@apollo/client"
3588
3676
  },
3589
3677
  "isOptional": true
3590
3678
  },
@@ -3705,7 +3793,8 @@
3705
3793
  "line": 7,
3706
3794
  "character": 13
3707
3795
  },
3708
- "name": "ReactNode"
3796
+ "name": "ReactNode",
3797
+ "packageName": "react"
3709
3798
  },
3710
3799
  "isOptional": false
3711
3800
  }
@@ -3736,7 +3825,8 @@
3736
3825
  "line": 10,
3737
3826
  "character": 55
3738
3827
  },
3739
- "name": "GraphQLProviderProps"
3828
+ "name": "GraphQLProviderProps",
3829
+ "internalFilePath": "graphql-provider/graphql-provider.tsx"
3740
3830
  },
3741
3831
  "isOptional": false,
3742
3832
  "objectBindingNodes": [
@@ -3786,7 +3876,7 @@
3786
3876
  "componentId": {
3787
3877
  "scope": "teambit.harmony",
3788
3878
  "name": "graphql",
3789
- "version": "1.0.227"
3879
+ "version": "1.0.229"
3790
3880
  },
3791
3881
  "taggedModuleExports": []
3792
3882
  }
@@ -0,0 +1,8 @@
1
+ import { HttpLink } from '@apollo/client';
2
+ import type { WebSocketLink } from '@apollo/client/link/ws';
3
+ /**
4
+ * create a link which splits routes data depending on type of operation.
5
+ * @param httpLink http link for apollo graphql
6
+ * @param wsLink web socket link for apollo graphql
7
+ */
8
+ export declare function createSplitLink(httpLink: HttpLink, wsLink: WebSocketLink): import("@apollo/client").ApolloLink;
@@ -0,0 +1,2 @@
1
+ import { GraphQLServer } from '../graphql-server';
2
+ export declare function createRemoteSchemas(servers: GraphQLServer[]): Promise<import("graphql").GraphQLSchema[]>;
@@ -0,0 +1 @@
1
+ export { createRemoteSchemas } from './create-remote-schemas';
@@ -0,0 +1,19 @@
1
+ export declare class GraphQlError {
2
+ /**
3
+ * http status code of error
4
+ */
5
+ readonly code: number;
6
+ /**
7
+ * error message of the error
8
+ */
9
+ readonly message?: string | undefined;
10
+ constructor(
11
+ /**
12
+ * http status code of error
13
+ */
14
+ code: number,
15
+ /**
16
+ * error message of the error
17
+ */
18
+ message?: string | undefined);
19
+ }
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ import type { GraphQLClient } from '../graphql.ui.runtime';
3
+ export type GraphQLProviderProps = {
4
+ client: GraphQLClient<any>;
5
+ children: ReactNode;
6
+ };
7
+ export declare function GraphQLProvider({ client, children }: GraphQLProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { GraphQLProvider } from './graphql-provider';
@@ -0,0 +1,4 @@
1
+ export interface GraphQLServer {
2
+ uri: string;
3
+ subscriptionsUri?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const GraphqlAspect: Aspect;
3
+ export default GraphqlAspect;
@@ -0,0 +1 @@
1
+ export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,120 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="got/dist/source/core/utils/timed-out" />
3
+ import { Harmony, SlotRegistry } from '@teambit/harmony';
4
+ import { Logger, LoggerMain } from '@teambit/logger';
5
+ import { Express } from 'express';
6
+ import { PubSubEngine } from 'graphql-subscriptions';
7
+ import { Server } from 'http';
8
+ import { GraphQLServer } from './graphql-server';
9
+ import { Schema } from './schema';
10
+ export declare enum Verb {
11
+ WRITE = "write",
12
+ READ = "read"
13
+ }
14
+ export type GraphQLConfig = {
15
+ port: number;
16
+ subscriptionsPortRange: number[];
17
+ subscriptionsPath: string;
18
+ disableCors?: boolean;
19
+ };
20
+ export type GraphQLServerSlot = SlotRegistry<GraphQLServer>;
21
+ export type SchemaSlot = SlotRegistry<Schema>;
22
+ export type PubSubSlot = SlotRegistry<PubSubEngine>;
23
+ export type GraphQLServerOptions = {
24
+ schemaSlot?: SchemaSlot;
25
+ app?: Express;
26
+ graphiql?: boolean;
27
+ disableIntrospection?: boolean;
28
+ remoteSchemas?: GraphQLServer[];
29
+ subscriptionsPortRange?: number[];
30
+ onWsConnect?: Function;
31
+ };
32
+ export declare class GraphqlMain {
33
+ /**
34
+ * extension config
35
+ */
36
+ readonly config: GraphQLConfig;
37
+ /**
38
+ * slot for registering graphql modules
39
+ */
40
+ private moduleSlot;
41
+ /**
42
+ * harmony context.
43
+ */
44
+ private context;
45
+ /**
46
+ * logger extension.
47
+ */
48
+ readonly logger: Logger;
49
+ private graphQLServerSlot;
50
+ /**
51
+ * graphql pubsub. allows to emit events to clients.
52
+ */
53
+ private pubSubSlot;
54
+ constructor(
55
+ /**
56
+ * extension config
57
+ */
58
+ config: GraphQLConfig,
59
+ /**
60
+ * slot for registering graphql modules
61
+ */
62
+ moduleSlot: SchemaSlot,
63
+ /**
64
+ * harmony context.
65
+ */
66
+ context: Harmony,
67
+ /**
68
+ * logger extension.
69
+ */
70
+ logger: Logger, graphQLServerSlot: GraphQLServerSlot,
71
+ /**
72
+ * graphql pubsub. allows to emit events to clients.
73
+ */
74
+ pubSubSlot: PubSubSlot);
75
+ get pubsub(): PubSubEngine;
76
+ private modules;
77
+ /**
78
+ * returns the schema for a specific aspect by its id.
79
+ */
80
+ getSchema(aspectId: string): Schema | undefined;
81
+ /**
82
+ * get multiple schema by aspect ids.
83
+ */
84
+ getSchemas(aspectIds: string[]): Schema[];
85
+ createServer(options: GraphQLServerOptions): Promise<Server>;
86
+ /**
87
+ * register a new graphql server.
88
+ */
89
+ registerServer(server: GraphQLServer): this;
90
+ /**
91
+ * register a pubsub client
92
+ */
93
+ registerPubSub(pubsub: PubSubEngine): this;
94
+ /**
95
+ * start a graphql server.
96
+ */
97
+ listen(port?: number, server?: Server, app?: Express): Promise<void>;
98
+ /**
99
+ * register a new graphql module.
100
+ */
101
+ register(schema: Schema): this;
102
+ private getPort;
103
+ /** create Subscription server with different port */
104
+ private createSubscription;
105
+ /** proxy ws Subscription server to avoid conflict with different websocket connections */
106
+ private proxySubscription;
107
+ private createRootModule;
108
+ private buildModules;
109
+ private getModuleDependencies;
110
+ static slots: (((registerFn: () => string) => SlotRegistry<Schema>) | ((registerFn: () => string) => SlotRegistry<GraphQLServer>) | ((registerFn: () => string) => SlotRegistry<PubSubSlot>))[];
111
+ static defaultConfig: {
112
+ port: number;
113
+ subscriptionsPortRange: number[];
114
+ disableCors: boolean;
115
+ subscriptionsPath: string;
116
+ };
117
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
118
+ static dependencies: import("@teambit/harmony").Aspect[];
119
+ static provider([loggerFactory]: [LoggerMain], config: GraphQLConfig, [moduleSlot, graphQLServerSlot, pubSubSlot]: [SchemaSlot, GraphQLServerSlot, PubSubSlot], context: Harmony): Promise<GraphqlMain>;
120
+ }
@@ -0,0 +1,37 @@
1
+ import { ReactNode } from 'react';
2
+ import { ApolloClient } from '@apollo/client';
3
+ import type { NormalizedCacheObject } from '@apollo/client';
4
+ import { GraphqlRenderPlugins } from './render-lifecycle';
5
+ /**
6
+ * Type of gql client.
7
+ * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly
8
+ * */
9
+ export type GraphQLClient<T> = ApolloClient<T>;
10
+ type ClientOptions = {
11
+ /** Preset in-memory cache with state (e.g. continue state from SSR) */
12
+ state?: NormalizedCacheObject;
13
+ /** endpoint for websocket connections */
14
+ subscriptionUri?: string;
15
+ };
16
+ export declare class GraphqlUI {
17
+ createClient(uri: string, { state, subscriptionUri }?: ClientOptions): ApolloClient<NormalizedCacheObject>;
18
+ createSsrClient({ serverUrl, headers }: {
19
+ serverUrl: string;
20
+ headers: any;
21
+ }): ApolloClient<NormalizedCacheObject>;
22
+ private createCache;
23
+ private createLink;
24
+ /**
25
+ * get the graphQL provider
26
+ */
27
+ getProvider: ({ client, children }: {
28
+ client: GraphQLClient<any>;
29
+ children: ReactNode;
30
+ }) => import("react/jsx-runtime").JSX.Element;
31
+ readonly renderPlugins: GraphqlRenderPlugins;
32
+ static runtime: import("@teambit/harmony").RuntimeDefinition;
33
+ static dependencies: never[];
34
+ static slots: never[];
35
+ static provider(): Promise<GraphqlUI>;
36
+ }
37
+ export {};
@@ -0,0 +1,7 @@
1
+ export { GraphqlAspect, GraphqlAspect as default } from './graphql.aspect';
2
+ export type { Schema } from './schema';
3
+ export type { GraphqlMain, SchemaSlot } from './graphql.main.runtime';
4
+ export type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';
5
+ export type { GraphQLServer } from './graphql-server';
6
+ export { GraphQLProvider } from './graphql-provider';
7
+ export { GraphQlError } from './graphql-error';
@@ -0,0 +1,2 @@
1
+ import { ErrorResponse } from '@apollo/client/link/error';
2
+ export declare function logError({ graphQLErrors, networkError, operation }: ErrorResponse): void;
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.227/dist/graphql.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.227/dist/graphql.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.229/dist/graphql.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.229/dist/graphql.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -0,0 +1,39 @@
1
+ import { ReactNode } from 'react';
2
+ import type { ApolloClient, NormalizedCacheObject } from '@apollo/client';
3
+ import type { SSR } from '@teambit/ui';
4
+ import type { GraphqlUI, GraphQLClient } from './graphql.ui.runtime';
5
+ type RenderContext = {
6
+ client: GraphQLClient<any>;
7
+ };
8
+ export declare class GraphqlRenderPlugins implements SSR.RenderPlugin<RenderContext, {
9
+ state?: NormalizedCacheObject;
10
+ }> {
11
+ private graphqlUI;
12
+ constructor(graphqlUI: GraphqlUI);
13
+ key: string;
14
+ serverInit: ({ browser }: SSR.SsrSession) => RenderContext;
15
+ /**
16
+ * Eagerly and recursively execute all gql queries in the app.
17
+ * Data will be available in gqlClient.extract()
18
+ */
19
+ onBeforeRender: (ctx: RenderContext, app: ReactNode) => Promise<void>;
20
+ serialize: (ctx?: RenderContext) => {
21
+ json: string;
22
+ } | undefined;
23
+ deserialize: (raw?: string) => {
24
+ state: NormalizedCacheObject | undefined;
25
+ };
26
+ private _client;
27
+ browserInit: ({ state }?: {
28
+ state?: NormalizedCacheObject;
29
+ }) => {
30
+ client: ApolloClient<NormalizedCacheObject>;
31
+ };
32
+ getClient(): ApolloClient<NormalizedCacheObject>;
33
+ private BrowserGqlProvider;
34
+ reactContext: ({ renderCtx, children }: {
35
+ renderCtx?: RenderContext;
36
+ children: ReactNode;
37
+ }) => import("react/jsx-runtime").JSX.Element;
38
+ }
39
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { DocumentNode } from 'graphql';
2
+ import type { SchemaDirectives } from '@graphql-modules/core';
3
+ /**
4
+ * graphql schema for an extension.
5
+ */
6
+ export type Schema = {
7
+ typeDefs?: string | DocumentNode;
8
+ resolvers?: {
9
+ [key: string]: any;
10
+ };
11
+ schemaDirectives?: SchemaDirectives;
12
+ };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graphql",
3
- "version": "1.0.227",
3
+ "version": "1.0.229",
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.227"
9
+ "version": "1.0.229"
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.860",
36
- "@teambit/logger": "0.0.953",
35
+ "@teambit/cli": "0.0.862",
36
+ "@teambit/logger": "0.0.955",
37
37
  "@teambit/toolbox.network.get-port": "1.0.6",
38
- "@teambit/ui": "1.0.227"
38
+ "@teambit/ui": "1.0.229"
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.30"
47
+ "@teambit/harmony.envs.core-aspect-env": "0.0.33"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@apollo/client": "^3.6.0",
package/tsconfig.json CHANGED
@@ -20,8 +20,7 @@
20
20
  "emitDeclarationOnly": true,
21
21
  "strict": true,
22
22
  "strictPropertyInitialization": false,
23
- "noImplicitAny": false,
24
- "composite": true
23
+ "noImplicitAny": false
25
24
  },
26
25
  "exclude": [
27
26
  "artifacts",
@@ -36,16 +35,5 @@
36
35
  "include": [
37
36
  "**/*",
38
37
  "**/*.json"
39
- ],
40
- "references": [
41
- {
42
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
43
- },
44
- {
45
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_logger@0.0.953"
46
- },
47
- {
48
- "path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@1.0.227"
49
- }
50
38
  ]
51
39
  }