@teambit/graphql 1.0.246 → 1.0.248

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.246" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.harmony/graphql@1.0.248" 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={52606:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.246",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(52606);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={58500:(e,t,o)=>{var r={id:"teambit.harmony/graphql@1.0.248",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(58500);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})()));
@@ -1090,7 +1090,7 @@
1090
1090
  "__schema": "ClassSchema",
1091
1091
  "location": {
1092
1092
  "filePath": "graphql.ui.runtime.tsx",
1093
- "line": 30,
1093
+ "line": 32,
1094
1094
  "character": 1
1095
1095
  },
1096
1096
  "signature": "class GraphqlUI",
@@ -1100,7 +1100,7 @@
1100
1100
  "__schema": "FunctionLikeSchema",
1101
1101
  "location": {
1102
1102
  "filePath": "graphql.ui.runtime.tsx",
1103
- "line": 31,
1103
+ "line": 33,
1104
1104
  "character": 3
1105
1105
  },
1106
1106
  "signature": "(method) GraphqlUI.createClient(uri: string, { state, subscriptionUri }?: ClientOptions): ApolloClient<NormalizedCacheObject>",
@@ -1110,7 +1110,7 @@
1110
1110
  "__schema": "ParameterSchema",
1111
1111
  "location": {
1112
1112
  "filePath": "graphql.ui.runtime.tsx",
1113
- "line": 31,
1113
+ "line": 33,
1114
1114
  "character": 16
1115
1115
  },
1116
1116
  "name": "uri",
@@ -1118,7 +1118,7 @@
1118
1118
  "__schema": "KeywordTypeSchema",
1119
1119
  "location": {
1120
1120
  "filePath": "graphql.ui.runtime.tsx",
1121
- "line": 31,
1121
+ "line": 33,
1122
1122
  "character": 21
1123
1123
  },
1124
1124
  "name": "string"
@@ -1130,7 +1130,7 @@
1130
1130
  "__schema": "ParameterSchema",
1131
1131
  "location": {
1132
1132
  "filePath": "graphql.ui.runtime.tsx",
1133
- "line": 31,
1133
+ "line": 33,
1134
1134
  "character": 29
1135
1135
  },
1136
1136
  "name": "{ state, subscriptionUri }",
@@ -1138,7 +1138,7 @@
1138
1138
  "__schema": "TypeRefSchema",
1139
1139
  "location": {
1140
1140
  "filePath": "graphql.ui.runtime.tsx",
1141
- "line": 31,
1141
+ "line": 33,
1142
1142
  "character": 57
1143
1143
  },
1144
1144
  "name": "ClientOptions",
@@ -1151,7 +1151,7 @@
1151
1151
  "__schema": "InferenceTypeSchema",
1152
1152
  "location": {
1153
1153
  "filePath": "graphql.ui.runtime.tsx",
1154
- "line": 31,
1154
+ "line": 33,
1155
1155
  "character": 31
1156
1156
  },
1157
1157
  "name": "state",
@@ -1162,7 +1162,7 @@
1162
1162
  "__schema": "InferenceTypeSchema",
1163
1163
  "location": {
1164
1164
  "filePath": "graphql.ui.runtime.tsx",
1165
- "line": 31,
1165
+ "line": 33,
1166
1166
  "character": 38
1167
1167
  },
1168
1168
  "name": "subscriptionUri",
@@ -1177,7 +1177,7 @@
1177
1177
  "__schema": "InferenceTypeSchema",
1178
1178
  "location": {
1179
1179
  "filePath": "graphql.ui.runtime.tsx",
1180
- "line": 31,
1180
+ "line": 33,
1181
1181
  "character": 3
1182
1182
  },
1183
1183
  "type": "ApolloClient<NormalizedCacheObject>"
@@ -1188,7 +1188,7 @@
1188
1188
  "__schema": "FunctionLikeSchema",
1189
1189
  "location": {
1190
1190
  "filePath": "graphql.ui.runtime.tsx",
1191
- "line": 40,
1191
+ "line": 42,
1192
1192
  "character": 3
1193
1193
  },
1194
1194
  "signature": "(method) GraphqlUI.createSsrClient({ serverUrl, headers }: {\n serverUrl: string;\n headers: any;\n}): ApolloClient<NormalizedCacheObject>",
@@ -1198,7 +1198,7 @@
1198
1198
  "__schema": "ParameterSchema",
1199
1199
  "location": {
1200
1200
  "filePath": "graphql.ui.runtime.tsx",
1201
- "line": 40,
1201
+ "line": 42,
1202
1202
  "character": 19
1203
1203
  },
1204
1204
  "name": "{ serverUrl, headers }",
@@ -1206,7 +1206,7 @@
1206
1206
  "__schema": "TypeLiteralSchema",
1207
1207
  "location": {
1208
1208
  "filePath": "graphql.ui.runtime.tsx",
1209
- "line": 40,
1209
+ "line": 42,
1210
1210
  "character": 43
1211
1211
  },
1212
1212
  "members": [
@@ -1214,7 +1214,7 @@
1214
1214
  "__schema": "VariableLikeSchema",
1215
1215
  "location": {
1216
1216
  "filePath": "graphql.ui.runtime.tsx",
1217
- "line": 40,
1217
+ "line": 42,
1218
1218
  "character": 45
1219
1219
  },
1220
1220
  "signature": "(property) serverUrl: string",
@@ -1223,7 +1223,7 @@
1223
1223
  "__schema": "KeywordTypeSchema",
1224
1224
  "location": {
1225
1225
  "filePath": "graphql.ui.runtime.tsx",
1226
- "line": 40,
1226
+ "line": 42,
1227
1227
  "character": 56
1228
1228
  },
1229
1229
  "name": "string"
@@ -1234,7 +1234,7 @@
1234
1234
  "__schema": "VariableLikeSchema",
1235
1235
  "location": {
1236
1236
  "filePath": "graphql.ui.runtime.tsx",
1237
- "line": 40,
1237
+ "line": 42,
1238
1238
  "character": 64
1239
1239
  },
1240
1240
  "signature": "(property) headers: any",
@@ -1243,7 +1243,7 @@
1243
1243
  "__schema": "KeywordTypeSchema",
1244
1244
  "location": {
1245
1245
  "filePath": "graphql.ui.runtime.tsx",
1246
- "line": 40,
1246
+ "line": 42,
1247
1247
  "character": 73
1248
1248
  },
1249
1249
  "name": "any"
@@ -1258,7 +1258,7 @@
1258
1258
  "__schema": "VariableLikeSchema",
1259
1259
  "location": {
1260
1260
  "filePath": "graphql.ui.runtime.tsx",
1261
- "line": 40,
1261
+ "line": 42,
1262
1262
  "character": 45
1263
1263
  },
1264
1264
  "signature": "(property) serverUrl: string",
@@ -1267,7 +1267,7 @@
1267
1267
  "__schema": "KeywordTypeSchema",
1268
1268
  "location": {
1269
1269
  "filePath": "graphql.ui.runtime.tsx",
1270
- "line": 40,
1270
+ "line": 42,
1271
1271
  "character": 56
1272
1272
  },
1273
1273
  "name": "string"
@@ -1278,7 +1278,7 @@
1278
1278
  "__schema": "VariableLikeSchema",
1279
1279
  "location": {
1280
1280
  "filePath": "graphql.ui.runtime.tsx",
1281
- "line": 40,
1281
+ "line": 42,
1282
1282
  "character": 64
1283
1283
  },
1284
1284
  "signature": "(property) headers: any",
@@ -1287,7 +1287,7 @@
1287
1287
  "__schema": "KeywordTypeSchema",
1288
1288
  "location": {
1289
1289
  "filePath": "graphql.ui.runtime.tsx",
1290
- "line": 40,
1290
+ "line": 42,
1291
1291
  "character": 73
1292
1292
  },
1293
1293
  "name": "any"
@@ -1302,7 +1302,7 @@
1302
1302
  "__schema": "InferenceTypeSchema",
1303
1303
  "location": {
1304
1304
  "filePath": "graphql.ui.runtime.tsx",
1305
- "line": 40,
1305
+ "line": 42,
1306
1306
  "character": 3
1307
1307
  },
1308
1308
  "type": "ApolloClient<NormalizedCacheObject>"
@@ -1313,14 +1313,14 @@
1313
1313
  "__schema": "VariableLikeSchema",
1314
1314
  "location": {
1315
1315
  "filePath": "graphql.ui.runtime.tsx",
1316
- "line": 86,
1316
+ "line": 88,
1317
1317
  "character": 3
1318
1318
  },
1319
1319
  "doc": {
1320
1320
  "__schema": "DocSchema",
1321
1321
  "location": {
1322
1322
  "filePath": "graphql.ui.runtime.tsx",
1323
- "line": 83,
1323
+ "line": 85,
1324
1324
  "character": 3
1325
1325
  },
1326
1326
  "raw": "/**\n * get the graphQL provider\n */",
@@ -1332,7 +1332,7 @@
1332
1332
  "__schema": "InferenceTypeSchema",
1333
1333
  "location": {
1334
1334
  "filePath": "graphql.ui.runtime.tsx",
1335
- "line": 86,
1335
+ "line": 88,
1336
1336
  "character": 3
1337
1337
  },
1338
1338
  "type": "({ client, children }: {\n client: GraphQLClient<any>;\n children: ReactNode;\n}) => React.JSX.Element"
@@ -1344,7 +1344,7 @@
1344
1344
  "__schema": "VariableLikeSchema",
1345
1345
  "location": {
1346
1346
  "filePath": "graphql.ui.runtime.tsx",
1347
- "line": 90,
1347
+ "line": 92,
1348
1348
  "character": 3
1349
1349
  },
1350
1350
  "signature": "(property) GraphqlUI.renderPlugins: GraphqlRenderPlugins",
@@ -1353,7 +1353,7 @@
1353
1353
  "__schema": "TypeRefSchema",
1354
1354
  "location": {
1355
1355
  "filePath": "graphql.ui.runtime.tsx",
1356
- "line": 90,
1356
+ "line": 92,
1357
1357
  "character": 3
1358
1358
  },
1359
1359
  "name": "GraphqlRenderPlugins",
@@ -1366,7 +1366,7 @@
1366
1366
  "__schema": "VariableLikeSchema",
1367
1367
  "location": {
1368
1368
  "filePath": "graphql.ui.runtime.tsx",
1369
- "line": 92,
1369
+ "line": 94,
1370
1370
  "character": 3
1371
1371
  },
1372
1372
  "signature": "(property) GraphqlUI.runtime: RuntimeDefinition",
@@ -1375,7 +1375,7 @@
1375
1375
  "__schema": "InferenceTypeSchema",
1376
1376
  "location": {
1377
1377
  "filePath": "graphql.ui.runtime.tsx",
1378
- "line": 92,
1378
+ "line": 94,
1379
1379
  "character": 3
1380
1380
  },
1381
1381
  "type": "RuntimeDefinition"
@@ -1387,7 +1387,7 @@
1387
1387
  "__schema": "VariableLikeSchema",
1388
1388
  "location": {
1389
1389
  "filePath": "graphql.ui.runtime.tsx",
1390
- "line": 93,
1390
+ "line": 95,
1391
1391
  "character": 3
1392
1392
  },
1393
1393
  "signature": "(property) GraphqlUI.dependencies: never[]",
@@ -1396,7 +1396,7 @@
1396
1396
  "__schema": "InferenceTypeSchema",
1397
1397
  "location": {
1398
1398
  "filePath": "graphql.ui.runtime.tsx",
1399
- "line": 93,
1399
+ "line": 95,
1400
1400
  "character": 3
1401
1401
  },
1402
1402
  "type": "never[]"
@@ -1408,7 +1408,7 @@
1408
1408
  "__schema": "VariableLikeSchema",
1409
1409
  "location": {
1410
1410
  "filePath": "graphql.ui.runtime.tsx",
1411
- "line": 94,
1411
+ "line": 96,
1412
1412
  "character": 3
1413
1413
  },
1414
1414
  "signature": "(property) GraphqlUI.slots: never[]",
@@ -1417,7 +1417,7 @@
1417
1417
  "__schema": "InferenceTypeSchema",
1418
1418
  "location": {
1419
1419
  "filePath": "graphql.ui.runtime.tsx",
1420
- "line": 94,
1420
+ "line": 96,
1421
1421
  "character": 3
1422
1422
  },
1423
1423
  "type": "never[]"
@@ -1429,7 +1429,7 @@
1429
1429
  "__schema": "FunctionLikeSchema",
1430
1430
  "location": {
1431
1431
  "filePath": "graphql.ui.runtime.tsx",
1432
- "line": 96,
1432
+ "line": 98,
1433
1433
  "character": 3
1434
1434
  },
1435
1435
  "signature": "(method) GraphqlUI.provider(): Promise<GraphqlUI>",
@@ -1439,7 +1439,7 @@
1439
1439
  "__schema": "InferenceTypeSchema",
1440
1440
  "location": {
1441
1441
  "filePath": "graphql.ui.runtime.tsx",
1442
- "line": 96,
1442
+ "line": 98,
1443
1443
  "character": 3
1444
1444
  },
1445
1445
  "type": "Promise<GraphqlUI>"
@@ -1457,14 +1457,14 @@
1457
1457
  "__schema": "TypeSchema",
1458
1458
  "location": {
1459
1459
  "filePath": "graphql.ui.runtime.tsx",
1460
- "line": 21,
1460
+ "line": 23,
1461
1461
  "character": 1
1462
1462
  },
1463
1463
  "doc": {
1464
1464
  "__schema": "DocSchema",
1465
1465
  "location": {
1466
1466
  "filePath": "graphql.ui.runtime.tsx",
1467
- "line": 17,
1467
+ "line": 19,
1468
1468
  "character": 1
1469
1469
  },
1470
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 * */",
@@ -1474,7 +1474,7 @@
1474
1474
  "__schema": "TagSchema",
1475
1475
  "location": {
1476
1476
  "filePath": "graphql.ui.runtime.tsx",
1477
- "line": 19,
1477
+ "line": 21,
1478
1478
  "character": 114
1479
1479
  },
1480
1480
  "tagName": "apollo",
@@ -1488,7 +1488,7 @@
1488
1488
  "__schema": "TypeRefSchema",
1489
1489
  "location": {
1490
1490
  "filePath": "graphql.ui.runtime.tsx",
1491
- "line": 21,
1491
+ "line": 23,
1492
1492
  "character": 32
1493
1493
  },
1494
1494
  "name": "ApolloClient",
@@ -1498,7 +1498,7 @@
1498
1498
  "__schema": "TypeRefSchema",
1499
1499
  "location": {
1500
1500
  "filePath": "graphql.ui.runtime.tsx",
1501
- "line": 21,
1501
+ "line": 23,
1502
1502
  "character": 45
1503
1503
  },
1504
1504
  "name": "T"
@@ -3210,14 +3210,14 @@
3210
3210
  "__schema": "TypeSchema",
3211
3211
  "location": {
3212
3212
  "filePath": "graphql.ui.runtime.tsx",
3213
- "line": 21,
3213
+ "line": 23,
3214
3214
  "character": 1
3215
3215
  },
3216
3216
  "doc": {
3217
3217
  "__schema": "DocSchema",
3218
3218
  "location": {
3219
3219
  "filePath": "graphql.ui.runtime.tsx",
3220
- "line": 17,
3220
+ "line": 19,
3221
3221
  "character": 1
3222
3222
  },
3223
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 * */",
@@ -3227,7 +3227,7 @@
3227
3227
  "__schema": "TagSchema",
3228
3228
  "location": {
3229
3229
  "filePath": "graphql.ui.runtime.tsx",
3230
- "line": 19,
3230
+ "line": 21,
3231
3231
  "character": 114
3232
3232
  },
3233
3233
  "tagName": "apollo",
@@ -3241,7 +3241,7 @@
3241
3241
  "__schema": "TypeRefSchema",
3242
3242
  "location": {
3243
3243
  "filePath": "graphql.ui.runtime.tsx",
3244
- "line": 21,
3244
+ "line": 23,
3245
3245
  "character": 32
3246
3246
  },
3247
3247
  "name": "ApolloClient",
@@ -3251,7 +3251,7 @@
3251
3251
  "__schema": "TypeRefSchema",
3252
3252
  "location": {
3253
3253
  "filePath": "graphql.ui.runtime.tsx",
3254
- "line": 21,
3254
+ "line": 23,
3255
3255
  "character": 45
3256
3256
  },
3257
3257
  "name": "T"
@@ -3263,7 +3263,7 @@
3263
3263
  "__schema": "ClassSchema",
3264
3264
  "location": {
3265
3265
  "filePath": "graphql.ui.runtime.tsx",
3266
- "line": 30,
3266
+ "line": 32,
3267
3267
  "character": 1
3268
3268
  },
3269
3269
  "signature": "class GraphqlUI",
@@ -3273,7 +3273,7 @@
3273
3273
  "__schema": "FunctionLikeSchema",
3274
3274
  "location": {
3275
3275
  "filePath": "graphql.ui.runtime.tsx",
3276
- "line": 31,
3276
+ "line": 33,
3277
3277
  "character": 3
3278
3278
  },
3279
3279
  "signature": "(method) GraphqlUI.createClient(uri: string, { state, subscriptionUri }?: ClientOptions): ApolloClient<NormalizedCacheObject>",
@@ -3283,7 +3283,7 @@
3283
3283
  "__schema": "ParameterSchema",
3284
3284
  "location": {
3285
3285
  "filePath": "graphql.ui.runtime.tsx",
3286
- "line": 31,
3286
+ "line": 33,
3287
3287
  "character": 16
3288
3288
  },
3289
3289
  "name": "uri",
@@ -3291,7 +3291,7 @@
3291
3291
  "__schema": "KeywordTypeSchema",
3292
3292
  "location": {
3293
3293
  "filePath": "graphql.ui.runtime.tsx",
3294
- "line": 31,
3294
+ "line": 33,
3295
3295
  "character": 21
3296
3296
  },
3297
3297
  "name": "string"
@@ -3303,7 +3303,7 @@
3303
3303
  "__schema": "ParameterSchema",
3304
3304
  "location": {
3305
3305
  "filePath": "graphql.ui.runtime.tsx",
3306
- "line": 31,
3306
+ "line": 33,
3307
3307
  "character": 29
3308
3308
  },
3309
3309
  "name": "{ state, subscriptionUri }",
@@ -3311,7 +3311,7 @@
3311
3311
  "__schema": "TypeRefSchema",
3312
3312
  "location": {
3313
3313
  "filePath": "graphql.ui.runtime.tsx",
3314
- "line": 31,
3314
+ "line": 33,
3315
3315
  "character": 57
3316
3316
  },
3317
3317
  "name": "ClientOptions",
@@ -3324,7 +3324,7 @@
3324
3324
  "__schema": "InferenceTypeSchema",
3325
3325
  "location": {
3326
3326
  "filePath": "graphql.ui.runtime.tsx",
3327
- "line": 31,
3327
+ "line": 33,
3328
3328
  "character": 31
3329
3329
  },
3330
3330
  "name": "state",
@@ -3335,7 +3335,7 @@
3335
3335
  "__schema": "InferenceTypeSchema",
3336
3336
  "location": {
3337
3337
  "filePath": "graphql.ui.runtime.tsx",
3338
- "line": 31,
3338
+ "line": 33,
3339
3339
  "character": 38
3340
3340
  },
3341
3341
  "name": "subscriptionUri",
@@ -3350,7 +3350,7 @@
3350
3350
  "__schema": "InferenceTypeSchema",
3351
3351
  "location": {
3352
3352
  "filePath": "graphql.ui.runtime.tsx",
3353
- "line": 31,
3353
+ "line": 33,
3354
3354
  "character": 3
3355
3355
  },
3356
3356
  "type": "ApolloClient<NormalizedCacheObject>"
@@ -3361,7 +3361,7 @@
3361
3361
  "__schema": "FunctionLikeSchema",
3362
3362
  "location": {
3363
3363
  "filePath": "graphql.ui.runtime.tsx",
3364
- "line": 40,
3364
+ "line": 42,
3365
3365
  "character": 3
3366
3366
  },
3367
3367
  "signature": "(method) GraphqlUI.createSsrClient({ serverUrl, headers }: {\n serverUrl: string;\n headers: any;\n}): ApolloClient<NormalizedCacheObject>",
@@ -3371,7 +3371,7 @@
3371
3371
  "__schema": "ParameterSchema",
3372
3372
  "location": {
3373
3373
  "filePath": "graphql.ui.runtime.tsx",
3374
- "line": 40,
3374
+ "line": 42,
3375
3375
  "character": 19
3376
3376
  },
3377
3377
  "name": "{ serverUrl, headers }",
@@ -3379,7 +3379,7 @@
3379
3379
  "__schema": "TypeLiteralSchema",
3380
3380
  "location": {
3381
3381
  "filePath": "graphql.ui.runtime.tsx",
3382
- "line": 40,
3382
+ "line": 42,
3383
3383
  "character": 43
3384
3384
  },
3385
3385
  "members": [
@@ -3387,7 +3387,7 @@
3387
3387
  "__schema": "VariableLikeSchema",
3388
3388
  "location": {
3389
3389
  "filePath": "graphql.ui.runtime.tsx",
3390
- "line": 40,
3390
+ "line": 42,
3391
3391
  "character": 45
3392
3392
  },
3393
3393
  "signature": "(property) serverUrl: string",
@@ -3396,7 +3396,7 @@
3396
3396
  "__schema": "KeywordTypeSchema",
3397
3397
  "location": {
3398
3398
  "filePath": "graphql.ui.runtime.tsx",
3399
- "line": 40,
3399
+ "line": 42,
3400
3400
  "character": 56
3401
3401
  },
3402
3402
  "name": "string"
@@ -3407,7 +3407,7 @@
3407
3407
  "__schema": "VariableLikeSchema",
3408
3408
  "location": {
3409
3409
  "filePath": "graphql.ui.runtime.tsx",
3410
- "line": 40,
3410
+ "line": 42,
3411
3411
  "character": 64
3412
3412
  },
3413
3413
  "signature": "(property) headers: any",
@@ -3416,7 +3416,7 @@
3416
3416
  "__schema": "KeywordTypeSchema",
3417
3417
  "location": {
3418
3418
  "filePath": "graphql.ui.runtime.tsx",
3419
- "line": 40,
3419
+ "line": 42,
3420
3420
  "character": 73
3421
3421
  },
3422
3422
  "name": "any"
@@ -3431,7 +3431,7 @@
3431
3431
  "__schema": "VariableLikeSchema",
3432
3432
  "location": {
3433
3433
  "filePath": "graphql.ui.runtime.tsx",
3434
- "line": 40,
3434
+ "line": 42,
3435
3435
  "character": 45
3436
3436
  },
3437
3437
  "signature": "(property) serverUrl: string",
@@ -3440,7 +3440,7 @@
3440
3440
  "__schema": "KeywordTypeSchema",
3441
3441
  "location": {
3442
3442
  "filePath": "graphql.ui.runtime.tsx",
3443
- "line": 40,
3443
+ "line": 42,
3444
3444
  "character": 56
3445
3445
  },
3446
3446
  "name": "string"
@@ -3451,7 +3451,7 @@
3451
3451
  "__schema": "VariableLikeSchema",
3452
3452
  "location": {
3453
3453
  "filePath": "graphql.ui.runtime.tsx",
3454
- "line": 40,
3454
+ "line": 42,
3455
3455
  "character": 64
3456
3456
  },
3457
3457
  "signature": "(property) headers: any",
@@ -3460,7 +3460,7 @@
3460
3460
  "__schema": "KeywordTypeSchema",
3461
3461
  "location": {
3462
3462
  "filePath": "graphql.ui.runtime.tsx",
3463
- "line": 40,
3463
+ "line": 42,
3464
3464
  "character": 73
3465
3465
  },
3466
3466
  "name": "any"
@@ -3475,7 +3475,7 @@
3475
3475
  "__schema": "InferenceTypeSchema",
3476
3476
  "location": {
3477
3477
  "filePath": "graphql.ui.runtime.tsx",
3478
- "line": 40,
3478
+ "line": 42,
3479
3479
  "character": 3
3480
3480
  },
3481
3481
  "type": "ApolloClient<NormalizedCacheObject>"
@@ -3486,14 +3486,14 @@
3486
3486
  "__schema": "VariableLikeSchema",
3487
3487
  "location": {
3488
3488
  "filePath": "graphql.ui.runtime.tsx",
3489
- "line": 86,
3489
+ "line": 88,
3490
3490
  "character": 3
3491
3491
  },
3492
3492
  "doc": {
3493
3493
  "__schema": "DocSchema",
3494
3494
  "location": {
3495
3495
  "filePath": "graphql.ui.runtime.tsx",
3496
- "line": 83,
3496
+ "line": 85,
3497
3497
  "character": 3
3498
3498
  },
3499
3499
  "raw": "/**\n * get the graphQL provider\n */",
@@ -3505,7 +3505,7 @@
3505
3505
  "__schema": "InferenceTypeSchema",
3506
3506
  "location": {
3507
3507
  "filePath": "graphql.ui.runtime.tsx",
3508
- "line": 86,
3508
+ "line": 88,
3509
3509
  "character": 3
3510
3510
  },
3511
3511
  "type": "({ client, children }: {\n client: GraphQLClient<any>;\n children: ReactNode;\n}) => React.JSX.Element"
@@ -3517,7 +3517,7 @@
3517
3517
  "__schema": "VariableLikeSchema",
3518
3518
  "location": {
3519
3519
  "filePath": "graphql.ui.runtime.tsx",
3520
- "line": 90,
3520
+ "line": 92,
3521
3521
  "character": 3
3522
3522
  },
3523
3523
  "signature": "(property) GraphqlUI.renderPlugins: GraphqlRenderPlugins",
@@ -3526,7 +3526,7 @@
3526
3526
  "__schema": "TypeRefSchema",
3527
3527
  "location": {
3528
3528
  "filePath": "graphql.ui.runtime.tsx",
3529
- "line": 90,
3529
+ "line": 92,
3530
3530
  "character": 3
3531
3531
  },
3532
3532
  "name": "GraphqlRenderPlugins",
@@ -3539,7 +3539,7 @@
3539
3539
  "__schema": "VariableLikeSchema",
3540
3540
  "location": {
3541
3541
  "filePath": "graphql.ui.runtime.tsx",
3542
- "line": 92,
3542
+ "line": 94,
3543
3543
  "character": 3
3544
3544
  },
3545
3545
  "signature": "(property) GraphqlUI.runtime: RuntimeDefinition",
@@ -3548,7 +3548,7 @@
3548
3548
  "__schema": "InferenceTypeSchema",
3549
3549
  "location": {
3550
3550
  "filePath": "graphql.ui.runtime.tsx",
3551
- "line": 92,
3551
+ "line": 94,
3552
3552
  "character": 3
3553
3553
  },
3554
3554
  "type": "RuntimeDefinition"
@@ -3560,7 +3560,7 @@
3560
3560
  "__schema": "VariableLikeSchema",
3561
3561
  "location": {
3562
3562
  "filePath": "graphql.ui.runtime.tsx",
3563
- "line": 93,
3563
+ "line": 95,
3564
3564
  "character": 3
3565
3565
  },
3566
3566
  "signature": "(property) GraphqlUI.dependencies: never[]",
@@ -3569,7 +3569,7 @@
3569
3569
  "__schema": "InferenceTypeSchema",
3570
3570
  "location": {
3571
3571
  "filePath": "graphql.ui.runtime.tsx",
3572
- "line": 93,
3572
+ "line": 95,
3573
3573
  "character": 3
3574
3574
  },
3575
3575
  "type": "never[]"
@@ -3581,7 +3581,7 @@
3581
3581
  "__schema": "VariableLikeSchema",
3582
3582
  "location": {
3583
3583
  "filePath": "graphql.ui.runtime.tsx",
3584
- "line": 94,
3584
+ "line": 96,
3585
3585
  "character": 3
3586
3586
  },
3587
3587
  "signature": "(property) GraphqlUI.slots: never[]",
@@ -3590,7 +3590,7 @@
3590
3590
  "__schema": "InferenceTypeSchema",
3591
3591
  "location": {
3592
3592
  "filePath": "graphql.ui.runtime.tsx",
3593
- "line": 94,
3593
+ "line": 96,
3594
3594
  "character": 3
3595
3595
  },
3596
3596
  "type": "never[]"
@@ -3602,7 +3602,7 @@
3602
3602
  "__schema": "FunctionLikeSchema",
3603
3603
  "location": {
3604
3604
  "filePath": "graphql.ui.runtime.tsx",
3605
- "line": 96,
3605
+ "line": 98,
3606
3606
  "character": 3
3607
3607
  },
3608
3608
  "signature": "(method) GraphqlUI.provider(): Promise<GraphqlUI>",
@@ -3612,7 +3612,7 @@
3612
3612
  "__schema": "InferenceTypeSchema",
3613
3613
  "location": {
3614
3614
  "filePath": "graphql.ui.runtime.tsx",
3615
- "line": 96,
3615
+ "line": 98,
3616
3616
  "character": 3
3617
3617
  },
3618
3618
  "type": "Promise<GraphqlUI>"
@@ -3628,11 +3628,53 @@
3628
3628
  }
3629
3629
  ],
3630
3630
  "internals": [
3631
+ {
3632
+ "__schema": "ModuleSchema",
3633
+ "location": {
3634
+ "filePath": "graphql.ui.runtime.tsx",
3635
+ "line": 17,
3636
+ "character": 1
3637
+ },
3638
+ "exports": [
3639
+ {
3640
+ "__schema": "VariableLikeSchema",
3641
+ "location": {
3642
+ "filePath": "graphql.ui.runtime.tsx",
3643
+ "line": 17,
3644
+ "character": 7
3645
+ },
3646
+ "signature": "const crossFetch: (input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>",
3647
+ "name": "crossFetch",
3648
+ "type": {
3649
+ "__schema": "TypeQuerySchema",
3650
+ "location": {
3651
+ "filePath": "graphql.ui.runtime.tsx",
3652
+ "line": 17,
3653
+ "character": 19
3654
+ },
3655
+ "signature": "function fetch(input: RequestInfo | URL, init?: RequestInit | undefined): Promise<Response>",
3656
+ "type": {
3657
+ "__schema": "InferenceTypeSchema",
3658
+ "location": {
3659
+ "filePath": "graphql.ui.runtime.tsx",
3660
+ "line": 17,
3661
+ "character": 26
3662
+ },
3663
+ "name": "fetch",
3664
+ "type": "Promise<Response>"
3665
+ }
3666
+ },
3667
+ "isOptional": false,
3668
+ "defaultValue": "_crossFetch as unknown as typeof fetch"
3669
+ }
3670
+ ],
3671
+ "internals": []
3672
+ },
3631
3673
  {
3632
3674
  "__schema": "TypeSchema",
3633
3675
  "location": {
3634
3676
  "filePath": "graphql.ui.runtime.tsx",
3635
- "line": 23,
3677
+ "line": 25,
3636
3678
  "character": 1
3637
3679
  },
3638
3680
  "signature": "type ClientOptions = {\n state?: NormalizedCacheObject | undefined;\n subscriptionUri?: string | undefined;\n}",
@@ -3641,7 +3683,7 @@
3641
3683
  "__schema": "TypeLiteralSchema",
3642
3684
  "location": {
3643
3685
  "filePath": "graphql.ui.runtime.tsx",
3644
- "line": 23,
3686
+ "line": 25,
3645
3687
  "character": 22
3646
3688
  },
3647
3689
  "members": [
@@ -3649,14 +3691,14 @@
3649
3691
  "__schema": "VariableLikeSchema",
3650
3692
  "location": {
3651
3693
  "filePath": "graphql.ui.runtime.tsx",
3652
- "line": 25,
3694
+ "line": 27,
3653
3695
  "character": 3
3654
3696
  },
3655
3697
  "doc": {
3656
3698
  "__schema": "DocSchema",
3657
3699
  "location": {
3658
3700
  "filePath": "graphql.ui.runtime.tsx",
3659
- "line": 24,
3701
+ "line": 26,
3660
3702
  "character": 3
3661
3703
  },
3662
3704
  "raw": "/** Preset in-memory cache with state (e.g. continue state from SSR) */",
@@ -3668,7 +3710,7 @@
3668
3710
  "__schema": "TypeRefSchema",
3669
3711
  "location": {
3670
3712
  "filePath": "graphql.ui.runtime.tsx",
3671
- "line": 25,
3713
+ "line": 27,
3672
3714
  "character": 11
3673
3715
  },
3674
3716
  "name": "NormalizedCacheObject",
@@ -3680,14 +3722,14 @@
3680
3722
  "__schema": "VariableLikeSchema",
3681
3723
  "location": {
3682
3724
  "filePath": "graphql.ui.runtime.tsx",
3683
- "line": 27,
3725
+ "line": 29,
3684
3726
  "character": 3
3685
3727
  },
3686
3728
  "doc": {
3687
3729
  "__schema": "DocSchema",
3688
3730
  "location": {
3689
3731
  "filePath": "graphql.ui.runtime.tsx",
3690
- "line": 26,
3732
+ "line": 28,
3691
3733
  "character": 3
3692
3734
  },
3693
3735
  "raw": "/** endpoint for websocket connections */",
@@ -3699,7 +3741,7 @@
3699
3741
  "__schema": "KeywordTypeSchema",
3700
3742
  "location": {
3701
3743
  "filePath": "graphql.ui.runtime.tsx",
3702
- "line": 27,
3744
+ "line": 29,
3703
3745
  "character": 21
3704
3746
  },
3705
3747
  "name": "string"
@@ -3713,7 +3755,7 @@
3713
3755
  "__schema": "UnImplementedSchema",
3714
3756
  "location": {
3715
3757
  "filePath": "graphql.ui.runtime.tsx",
3716
- "line": 103,
3758
+ "line": 105,
3717
3759
  "character": 1
3718
3760
  },
3719
3761
  "name": "GraphqlAspect.addRuntime(GraphqlUI);",
@@ -3876,7 +3918,7 @@
3876
3918
  "componentId": {
3877
3919
  "scope": "teambit.harmony",
3878
3920
  "name": "graphql",
3879
- "version": "1.0.246"
3921
+ "version": "1.0.248"
3880
3922
  },
3881
3923
  "taggedModuleExports": []
3882
3924
  }
@@ -39,9 +39,9 @@ function _error() {
39
39
  };
40
40
  return data;
41
41
  }
42
- function _crossFetch() {
43
- const data = _interopRequireDefault(require("cross-fetch"));
44
- _crossFetch = function () {
42
+ function _nodeFetch() {
43
+ const data = _interopRequireDefault(require("@pnpm/node-fetch"));
44
+ _nodeFetch = function () {
45
45
  return data;
46
46
  };
47
47
  return data;
@@ -85,6 +85,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
85
85
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
86
86
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
87
87
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
88
+ const crossFetch = _nodeFetch().default;
89
+
88
90
  /**
89
91
  * Type of gql client.
90
92
  * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly
@@ -127,7 +129,7 @@ class GraphqlUI {
127
129
  credentials: 'include',
128
130
  uri: serverUrl,
129
131
  headers,
130
- fetch: _crossFetch().default
132
+ fetch: crossFetch
131
133
  })]);
132
134
  const client = new (_client().ApolloClient)({
133
135
  ssrMode: true,
@@ -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","r","e","Symbol","toPrimitive","call","TypeError","String","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,gBAAA,YAAAA,CAAA;IAAA,OAAAT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,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":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_ui","_client","_ws","_error","_nodeFetch","_createLink","_graphqlProvider","_graphql","_renderLifecycle","_logging","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","crossFetch","_crossFetch","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","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 '@pnpm/node-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\nconst crossFetch: typeof fetch = _crossFetch as unknown as typeof fetch;\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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IAErC,OAAOH,oBAAU,CAACC,IAAI,CAAC,CAACkB,WAAW,EAAEF,UAAU,CAAC,CAAC;EACnD;EAeA,aAAaG,QAAQA,CAAA,EAAG;IACtB,MAAMC,SAAS,GAAG,IAAIxC,SAAS,CAAC,CAAC;IAEjC,OAAOwC,SAAS;EAClB;AACF;AAACC,OAAA,CAAAzC,SAAA,GAAAA,SAAA;AAAAtB,eAAA,CAvEYsB,SAAS,aA8DH0C,eAAS;AAAAhE,eAAA,CA9DfsB,SAAS,kBA+DE,EAAE;AAAAtB,eAAA,CA/DbsB,SAAS,WAgEL,EAAE;AASnB2C,wBAAa,CAACC,UAAU,CAAC5C,SAAS,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.246/dist/graphql.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.246/dist/graphql.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.248/dist/graphql.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_graphql@1.0.248/dist/graphql.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -6,7 +6,7 @@ import type { NormalizedCacheObject } from '@apollo/client';
6
6
  import { WebSocketLink } from '@apollo/client/link/ws';
7
7
  import { onError } from '@apollo/client/link/error';
8
8
 
9
- import crossFetch from 'cross-fetch';
9
+ import _crossFetch from '@pnpm/node-fetch';
10
10
 
11
11
  import { createSplitLink } from './create-link';
12
12
  import { GraphQLProvider } from './graphql-provider';
@@ -14,6 +14,8 @@ import { GraphqlAspect } from './graphql.aspect';
14
14
  import { GraphqlRenderPlugins } from './render-lifecycle';
15
15
  import { logError } from './logging';
16
16
 
17
+ const crossFetch: typeof fetch = _crossFetch as unknown as typeof fetch;
18
+
17
19
  /**
18
20
  * Type of gql client.
19
21
  * Used to abstract Apollo client, so consumers could import the type from graphql.ui, and not have to depend on @apollo/client directly
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/graphql",
3
- "version": "1.0.246",
3
+ "version": "1.0.248",
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.246"
9
+ "version": "1.0.248"
10
10
  },
11
11
  "dependencies": {
12
12
  "@graphql-modules/core": "0.7.17",
@@ -18,7 +18,7 @@
18
18
  "graphql-subscriptions": "1.2.0",
19
19
  "http-proxy": "1.18.1",
20
20
  "subscriptions-transport-ws": "0.9.18",
21
- "cross-fetch": "3.1.5",
21
+ "@pnpm/node-fetch": "^1.0.0",
22
22
  "lodash.pick": "4.4.0",
23
23
  "apollo-link-context": "1.0.20",
24
24
  "apollo-link-http": "1.5.17",
@@ -35,7 +35,7 @@
35
35
  "@teambit/cli": "0.0.862",
36
36
  "@teambit/logger": "0.0.955",
37
37
  "@teambit/toolbox.network.get-port": "1.0.6",
38
- "@teambit/ui": "1.0.246"
38
+ "@teambit/ui": "1.0.248"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/cors": "2.8.10",