@merkur/plugin-graphql-client 0.37.4 → 0.37.7
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.
- package/lib/index.cjs +14 -11
- package/lib/index.es9.cjs +12 -11
- package/lib/index.es9.mjs +12 -11
- package/lib/index.js +14 -11
- package/lib/index.mjs +14 -11
- package/lib/index.umd.js +1 -1
- package/package.json +2 -2
package/lib/index.cjs
CHANGED
|
@@ -22,20 +22,23 @@ const ENV =
|
|
|
22
22
|
? process.env.NODE_ENV
|
|
23
23
|
: DEV;
|
|
24
24
|
|
|
25
|
-
function setEndpointUrl(widget, url) {
|
|
26
|
-
widget.$in.graphqlClient.endpointUrl = url;
|
|
25
|
+
function setEndpointUrl(widget, url, name = 'graphql') {
|
|
26
|
+
widget.$in.graphqlClient[name].endpointUrl = url;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function setEntityClasses(widget, entityClasses) {
|
|
30
|
-
widget.$in.graphqlClient.entityClasses =
|
|
29
|
+
function setEntityClasses(widget, entityClasses, name = 'graphql') {
|
|
30
|
+
widget.$in.graphqlClient[name].entityClasses =
|
|
31
|
+
buildTypeToEntityMap(entityClasses);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
function graphqlClientPlugin() {
|
|
34
|
+
function graphqlClientPlugin(name = 'graphql') {
|
|
34
35
|
return {
|
|
35
36
|
async setup(widget) {
|
|
36
|
-
core.assignMissingKeys(widget, graphqlClientAPI());
|
|
37
|
+
core.assignMissingKeys(widget, graphqlClientAPI(name));
|
|
37
38
|
|
|
38
|
-
widget.$in.graphqlClient = {
|
|
39
|
+
if (!widget.$in.graphqlClient) widget.$in.graphqlClient = {};
|
|
40
|
+
|
|
41
|
+
widget.$in.graphqlClient[name] = {
|
|
39
42
|
endpointUrl: '',
|
|
40
43
|
entityClasses: {},
|
|
41
44
|
};
|
|
@@ -49,18 +52,18 @@ function graphqlClientPlugin() {
|
|
|
49
52
|
);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
core.bindWidgetToFunctions(widget, widget
|
|
55
|
+
core.bindWidgetToFunctions(widget, widget[name]);
|
|
53
56
|
|
|
54
57
|
return widget;
|
|
55
58
|
},
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
function graphqlClientAPI() {
|
|
62
|
+
function graphqlClientAPI(name = 'graphql') {
|
|
60
63
|
return {
|
|
61
|
-
|
|
64
|
+
[name]: {
|
|
62
65
|
async request(widget, operation, variables = {}, options = {}) {
|
|
63
|
-
const { endpointUrl, entityClasses } = widget.$in.graphqlClient;
|
|
66
|
+
const { endpointUrl, entityClasses } = widget.$in.graphqlClient[name];
|
|
64
67
|
const { headers = {}, body = {}, ...restOptions } = options;
|
|
65
68
|
|
|
66
69
|
operation = addTypenameToSelections(operation);
|
package/lib/index.es9.cjs
CHANGED
|
@@ -14,17 +14,18 @@ const TYPENAME_FIELD = {
|
|
|
14
14
|
};
|
|
15
15
|
const DEV = 'development';
|
|
16
16
|
const ENV = typeof process !== 'undefined' && process && process.env ? process.env.NODE_ENV : DEV;
|
|
17
|
-
function setEndpointUrl(widget, url) {
|
|
18
|
-
widget.$in.graphqlClient.endpointUrl = url;
|
|
17
|
+
function setEndpointUrl(widget, url, name = 'graphql') {
|
|
18
|
+
widget.$in.graphqlClient[name].endpointUrl = url;
|
|
19
19
|
}
|
|
20
|
-
function setEntityClasses(widget, entityClasses) {
|
|
21
|
-
widget.$in.graphqlClient.entityClasses = buildTypeToEntityMap(entityClasses);
|
|
20
|
+
function setEntityClasses(widget, entityClasses, name = 'graphql') {
|
|
21
|
+
widget.$in.graphqlClient[name].entityClasses = buildTypeToEntityMap(entityClasses);
|
|
22
22
|
}
|
|
23
|
-
function graphqlClientPlugin() {
|
|
23
|
+
function graphqlClientPlugin(name = 'graphql') {
|
|
24
24
|
return {
|
|
25
25
|
async setup(widget) {
|
|
26
|
-
core.assignMissingKeys(widget, graphqlClientAPI());
|
|
27
|
-
widget.$in.graphqlClient = {
|
|
26
|
+
core.assignMissingKeys(widget, graphqlClientAPI(name));
|
|
27
|
+
if (!widget.$in.graphqlClient) widget.$in.graphqlClient = {};
|
|
28
|
+
widget.$in.graphqlClient[name] = {
|
|
28
29
|
endpointUrl: '',
|
|
29
30
|
entityClasses: {}
|
|
30
31
|
};
|
|
@@ -34,19 +35,19 @@ function graphqlClientPlugin() {
|
|
|
34
35
|
if (ENV === DEV && !widget.$in.httpClient) {
|
|
35
36
|
throw new Error('You must install missing plugin: npm i @merkur/plugin-http-client');
|
|
36
37
|
}
|
|
37
|
-
core.bindWidgetToFunctions(widget, widget
|
|
38
|
+
core.bindWidgetToFunctions(widget, widget[name]);
|
|
38
39
|
return widget;
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
function graphqlClientAPI() {
|
|
43
|
+
function graphqlClientAPI(name = 'graphql') {
|
|
43
44
|
return {
|
|
44
|
-
|
|
45
|
+
[name]: {
|
|
45
46
|
async request(widget, operation, variables = {}, options = {}) {
|
|
46
47
|
const {
|
|
47
48
|
endpointUrl,
|
|
48
49
|
entityClasses
|
|
49
|
-
} = widget.$in.graphqlClient;
|
|
50
|
+
} = widget.$in.graphqlClient[name];
|
|
50
51
|
const {
|
|
51
52
|
headers = {},
|
|
52
53
|
body = {},
|
package/lib/index.es9.mjs
CHANGED
|
@@ -12,17 +12,18 @@ const TYPENAME_FIELD = {
|
|
|
12
12
|
};
|
|
13
13
|
const DEV = 'development';
|
|
14
14
|
const ENV = typeof process !== 'undefined' && process && process.env ? process.env.NODE_ENV : DEV;
|
|
15
|
-
function setEndpointUrl(widget, url) {
|
|
16
|
-
widget.$in.graphqlClient.endpointUrl = url;
|
|
15
|
+
function setEndpointUrl(widget, url, name = 'graphql') {
|
|
16
|
+
widget.$in.graphqlClient[name].endpointUrl = url;
|
|
17
17
|
}
|
|
18
|
-
function setEntityClasses(widget, entityClasses) {
|
|
19
|
-
widget.$in.graphqlClient.entityClasses = buildTypeToEntityMap(entityClasses);
|
|
18
|
+
function setEntityClasses(widget, entityClasses, name = 'graphql') {
|
|
19
|
+
widget.$in.graphqlClient[name].entityClasses = buildTypeToEntityMap(entityClasses);
|
|
20
20
|
}
|
|
21
|
-
function graphqlClientPlugin() {
|
|
21
|
+
function graphqlClientPlugin(name = 'graphql') {
|
|
22
22
|
return {
|
|
23
23
|
async setup(widget) {
|
|
24
|
-
assignMissingKeys(widget, graphqlClientAPI());
|
|
25
|
-
widget.$in.graphqlClient = {
|
|
24
|
+
assignMissingKeys(widget, graphqlClientAPI(name));
|
|
25
|
+
if (!widget.$in.graphqlClient) widget.$in.graphqlClient = {};
|
|
26
|
+
widget.$in.graphqlClient[name] = {
|
|
26
27
|
endpointUrl: '',
|
|
27
28
|
entityClasses: {}
|
|
28
29
|
};
|
|
@@ -32,19 +33,19 @@ function graphqlClientPlugin() {
|
|
|
32
33
|
if (ENV === DEV && !widget.$in.httpClient) {
|
|
33
34
|
throw new Error('You must install missing plugin: npm i @merkur/plugin-http-client');
|
|
34
35
|
}
|
|
35
|
-
bindWidgetToFunctions(widget, widget
|
|
36
|
+
bindWidgetToFunctions(widget, widget[name]);
|
|
36
37
|
return widget;
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
function graphqlClientAPI() {
|
|
41
|
+
function graphqlClientAPI(name = 'graphql') {
|
|
41
42
|
return {
|
|
42
|
-
|
|
43
|
+
[name]: {
|
|
43
44
|
async request(widget, operation, variables = {}, options = {}) {
|
|
44
45
|
const {
|
|
45
46
|
endpointUrl,
|
|
46
47
|
entityClasses
|
|
47
|
-
} = widget.$in.graphqlClient;
|
|
48
|
+
} = widget.$in.graphqlClient[name];
|
|
48
49
|
const {
|
|
49
50
|
headers = {},
|
|
50
51
|
body = {},
|
package/lib/index.js
CHANGED
|
@@ -22,20 +22,23 @@ const ENV =
|
|
|
22
22
|
? process.env.NODE_ENV
|
|
23
23
|
: DEV;
|
|
24
24
|
|
|
25
|
-
function setEndpointUrl(widget, url) {
|
|
26
|
-
widget.$in.graphqlClient.endpointUrl = url;
|
|
25
|
+
function setEndpointUrl(widget, url, name = 'graphql') {
|
|
26
|
+
widget.$in.graphqlClient[name].endpointUrl = url;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function setEntityClasses(widget, entityClasses) {
|
|
30
|
-
widget.$in.graphqlClient.entityClasses =
|
|
29
|
+
function setEntityClasses(widget, entityClasses, name = 'graphql') {
|
|
30
|
+
widget.$in.graphqlClient[name].entityClasses =
|
|
31
|
+
buildTypeToEntityMap(entityClasses);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
function graphqlClientPlugin() {
|
|
34
|
+
function graphqlClientPlugin(name = 'graphql') {
|
|
34
35
|
return {
|
|
35
36
|
async setup(widget) {
|
|
36
|
-
core.assignMissingKeys(widget, graphqlClientAPI());
|
|
37
|
+
core.assignMissingKeys(widget, graphqlClientAPI(name));
|
|
37
38
|
|
|
38
|
-
widget.$in.graphqlClient = {
|
|
39
|
+
if (!widget.$in.graphqlClient) widget.$in.graphqlClient = {};
|
|
40
|
+
|
|
41
|
+
widget.$in.graphqlClient[name] = {
|
|
39
42
|
endpointUrl: '',
|
|
40
43
|
entityClasses: {},
|
|
41
44
|
};
|
|
@@ -49,18 +52,18 @@ function graphqlClientPlugin() {
|
|
|
49
52
|
);
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
core.bindWidgetToFunctions(widget, widget
|
|
55
|
+
core.bindWidgetToFunctions(widget, widget[name]);
|
|
53
56
|
|
|
54
57
|
return widget;
|
|
55
58
|
},
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
function graphqlClientAPI() {
|
|
62
|
+
function graphqlClientAPI(name = 'graphql') {
|
|
60
63
|
return {
|
|
61
|
-
|
|
64
|
+
[name]: {
|
|
62
65
|
async request(widget, operation, variables = {}, options = {}) {
|
|
63
|
-
const { endpointUrl, entityClasses } = widget.$in.graphqlClient;
|
|
66
|
+
const { endpointUrl, entityClasses } = widget.$in.graphqlClient[name];
|
|
64
67
|
const { headers = {}, body = {}, ...restOptions } = options;
|
|
65
68
|
|
|
66
69
|
operation = addTypenameToSelections(operation);
|
package/lib/index.mjs
CHANGED
|
@@ -20,20 +20,23 @@ const ENV =
|
|
|
20
20
|
? process.env.NODE_ENV
|
|
21
21
|
: DEV;
|
|
22
22
|
|
|
23
|
-
function setEndpointUrl(widget, url) {
|
|
24
|
-
widget.$in.graphqlClient.endpointUrl = url;
|
|
23
|
+
function setEndpointUrl(widget, url, name = 'graphql') {
|
|
24
|
+
widget.$in.graphqlClient[name].endpointUrl = url;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function setEntityClasses(widget, entityClasses) {
|
|
28
|
-
widget.$in.graphqlClient.entityClasses =
|
|
27
|
+
function setEntityClasses(widget, entityClasses, name = 'graphql') {
|
|
28
|
+
widget.$in.graphqlClient[name].entityClasses =
|
|
29
|
+
buildTypeToEntityMap(entityClasses);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
function graphqlClientPlugin() {
|
|
32
|
+
function graphqlClientPlugin(name = 'graphql') {
|
|
32
33
|
return {
|
|
33
34
|
async setup(widget) {
|
|
34
|
-
assignMissingKeys(widget, graphqlClientAPI());
|
|
35
|
+
assignMissingKeys(widget, graphqlClientAPI(name));
|
|
35
36
|
|
|
36
|
-
widget.$in.graphqlClient = {
|
|
37
|
+
if (!widget.$in.graphqlClient) widget.$in.graphqlClient = {};
|
|
38
|
+
|
|
39
|
+
widget.$in.graphqlClient[name] = {
|
|
37
40
|
endpointUrl: '',
|
|
38
41
|
entityClasses: {},
|
|
39
42
|
};
|
|
@@ -47,18 +50,18 @@ function graphqlClientPlugin() {
|
|
|
47
50
|
);
|
|
48
51
|
}
|
|
49
52
|
|
|
50
|
-
bindWidgetToFunctions(widget, widget
|
|
53
|
+
bindWidgetToFunctions(widget, widget[name]);
|
|
51
54
|
|
|
52
55
|
return widget;
|
|
53
56
|
},
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
function graphqlClientAPI() {
|
|
60
|
+
function graphqlClientAPI(name = 'graphql') {
|
|
58
61
|
return {
|
|
59
|
-
|
|
62
|
+
[name]: {
|
|
60
63
|
async request(widget, operation, variables = {}, options = {}) {
|
|
61
|
-
const { endpointUrl, entityClasses } = widget.$in.graphqlClient;
|
|
64
|
+
const { endpointUrl, entityClasses } = widget.$in.graphqlClient[name];
|
|
62
65
|
const { headers = {}, body = {}, ...restOptions } = options;
|
|
63
66
|
|
|
64
67
|
operation = addTypenameToSelections(operation);
|
package/lib/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r,e){if("function"==typeof define&&define.amd)define("@merkur/plugin-graphql-client",["exports","@merkur/core","graphql","@merkur/plugin-error"],e);else if("undefined"!=typeof exports)e(exports,require("@merkur/core"),require("graphql"),require("@merkur/plugin-error"));else{var t={exports:{}};e(t.exports,r.Merkur.Core,r.graphql,r.Merkur.Plugin.Error),r.merkurPluginGraphqlClient=t.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(r,e,t,n){Object.defineProperty(r,"__esModule",{value:!0}),r.UnauthorizedError=r.GraphQLError=void 0,r.graphqlClientPlugin=function(){return{setup:function(
|
|
1
|
+
!function(r,e){if("function"==typeof define&&define.amd)define("@merkur/plugin-graphql-client",["exports","@merkur/core","graphql","@merkur/plugin-error"],e);else if("undefined"!=typeof exports)e(exports,require("@merkur/core"),require("graphql"),require("@merkur/plugin-error"));else{var t={exports:{}};e(t.exports,r.Merkur.Core,r.graphql,r.Merkur.Plugin.Error),r.merkurPluginGraphqlClient=t.exports}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:this,(function(r,e,t,n){Object.defineProperty(r,"__esModule",{value:!0}),r.UnauthorizedError=r.GraphQLError=void 0,r.graphqlClientPlugin=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"graphql";return{setup:function(n){return d((function*(){return(0,e.assignMissingKeys)(n,function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"graphql";return p({},r,{request:function(e,n){var u=arguments;return d((function*(){var a,l=u.length>2&&void 0!==u[2]?u[2]:{},c=u.length>3&&void 0!==u[3]?u[3]:{},f=e.$in.graphqlClient[r],p=f.endpointUrl,y=f.entityClasses,d=c.headers,b=void 0===d?{}:d,v=c.body,h=void 0===v?{}:v,m=function(r,e){if(null==r)return{};var t,n,o=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(n=0;n<i.length;n++)t=i[n],e.includes(t)||{}.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}(c,o);a=n,n=(0,t.visit)(a,{SelectionSet:{enter:function(r,e,t){if(!t||"OperationDefinition"!==t.kind){var n=r.selections;if(n&&!(n.some((function(r){return"Field"===r.kind&&("__typename"===r.name.value||0===r.name.value.lastIndexOf("__",0))}))||"Field"===t.kind&&t.directives&&t.directives.some((function(r){return"export"===r.name.value}))))return Object.assign({},r,{selections:[].concat(i(n),[q])})}}}});var g=(yield e.http.request(s({url:p,method:"POST",headers:s({"Content-Type":"application/json"},b),body:s({query:(0,t.stripIgnoredCharacters)((0,t.print)(n)),variables:l},h)},m))).response.body,O=g.errors,j=g.data,w=void 0===j?{}:j;return O?Array.isArray(O)&&O.some((function(r){return"unauthorized"===r.status}))?Promise.reject(new S("Unauthorized Error",{errors:O,data:w})):Promise.reject(new E("Api Error",{errors:O,data:w})):k(w,y)}))()}})}(r)),n.$in.graphqlClient||(n.$in.graphqlClient={}),n.$in.graphqlClient[r]={endpointUrl:"",entityClasses:{}},n}))()},create:function(t){return d((function*(){if(C===_&&!t.$in.httpClient)throw new Error("You must install missing plugin: npm i @merkur/plugin-http-client");return(0,e.bindWidgetToFunctions)(t,t[r]),t}))()}}},r.setEndpointUrl=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"graphql";r.$in.graphqlClient[t].endpointUrl=e},r.setEntityClasses=function(r,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"graphql";r.$in.graphqlClient[t].entityClasses=function(r){var e={};return r.forEach((function(r){var t=r.entityType;Array.isArray(t)||(t=[t]),t.forEach((function(t){return e[t]=r}))})),e}(e)};var o=["headers","body"];function i(r){return function(r){if(Array.isArray(r))return c(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||l(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(r){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},u(r)}function a(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,i,u,a=[],l=!0,c=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;l=!1}else for(;!(l=(n=i.call(t)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(r){c=!0,o=r}finally{try{if(!l&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(c)throw o}}return a}}(r,e)||l(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(r,e){if(r){if("string"==typeof r)return c(r,e);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(r,e):void 0}}function c(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function f(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function s(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?f(Object(t),!0).forEach((function(e){p(r,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))}))}return r}function p(r,e,t){return(e=h(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function y(r,e,t,n,o,i,u){try{var a=r[i](u),l=a.value}catch(r){return void t(r)}a.done?e(l):Promise.resolve(l).then(n,o)}function d(r){return function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function u(r){y(i,n,o,u,a,"next",r)}function a(r){y(i,n,o,u,a,"throw",r)}u(void 0)}))}}function b(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,h(n.key),n)}}function v(r,e,t){return e&&b(r.prototype,e),t&&b(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function h(r){var e=function(r,e){if("object"!=u(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var n=t.call(r,e||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==u(e)?e:e+""}function m(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function g(r,e,t){return e=j(e),function(r,e){if(e&&("object"==u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}(r,O()?Reflect.construct(e,t||[],j(r).constructor):e.apply(r,t))}function O(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(r){}return(O=function(){return!!r})()}function j(r){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},j(r)}function w(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&P(r,e)}function P(r,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,e){return r.__proto__=e,r},P(r,e)}var E=r.GraphQLError=function(r){function e(){return m(this,e),g(this,e,arguments)}return w(e,r),v(e)}(n.GenericError),S=r.UnauthorizedError=function(r){function e(){return m(this,e),g(this,e,arguments)}return w(e,r),v(e)}(E),q={kind:"Field",name:{kind:"Name",value:"__typename"}},_="development",C="undefined"!=typeof process&&process&&process.env?process.env.NODE_ENV:_;function k(r,e){var t={};if("string"==typeof r)return r;Object.entries(r).forEach((function(r){var n=a(r,2),o=n[0],i=n[1];Array.isArray(i)?i=i.map((function(r){return k(r,e)})):"object"===u(i)&&null!==i&&(i=k(i,e)),t[o]=i}));var n=t.__typename;return n&&e[n]?Reflect.construct(e[n],[t]):t}}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkur/plugin-graphql-client",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.7",
|
|
4
4
|
"description": "Merkur event emitter plugin.",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"module": "lib/index",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"graphql": "^16.6.0",
|
|
66
66
|
"graphql-tag": "^2.12.6"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "ac7a3612ea9c4313cbb0735433c0e6e7de808526"
|
|
69
69
|
}
|