@luvio/lwc-luvio 0.99.1 → 0.99.2

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.
@@ -434,11 +434,14 @@ class LWCGraphQLLuvioWireAdapter extends LWCLuvioWireAdapter {
434
434
  super(adapter, name, luvio, callback);
435
435
  this.astResolver = astResolver;
436
436
  }
437
- // sanitize in the update is causing us to lose ast object reference
438
- // TODO: we need to look into this to update sanitize or remove it
439
437
  update(config, _context) {
440
438
  this.unsubscribe();
441
- this.config = config;
439
+ // graphql query AST is passed by reference
440
+ // sanitizing it makes a copy and we lose that reference
441
+ this.config = {
442
+ ...sanitize(config),
443
+ query: config.query,
444
+ };
442
445
  this.callAdapter();
443
446
  }
444
447
  /**
@@ -438,11 +438,14 @@
438
438
  super(adapter, name, luvio, callback);
439
439
  this.astResolver = astResolver;
440
440
  }
441
- // sanitize in the update is causing us to lose ast object reference
442
- // TODO: we need to look into this to update sanitize or remove it
443
441
  update(config, _context) {
444
442
  this.unsubscribe();
445
- this.config = config;
443
+ // graphql query AST is passed by reference
444
+ // sanitizing it makes a copy and we lose that reference
445
+ this.config = {
446
+ ...sanitize(config),
447
+ query: config.query,
448
+ };
446
449
  this.callAdapter();
447
450
  }
448
451
  /**
@@ -498,11 +498,11 @@
498
498
  _this.astResolver = astResolver;
499
499
  return _this;
500
500
  }
501
- // sanitize in the update is causing us to lose ast object reference
502
- // TODO: we need to look into this to update sanitize or remove it
503
501
  LWCGraphQLLuvioWireAdapter.prototype.update = function (config, _context) {
504
502
  this.unsubscribe();
505
- this.config = config;
503
+ // graphql query AST is passed by reference
504
+ // sanitizing it makes a copy and we lose that reference
505
+ this.config = __assign(__assign({}, sanitize(config)), { query: config.query });
506
506
  this.callAdapter();
507
507
  };
508
508
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luvio/lwc-luvio",
3
- "version": "0.99.1",
3
+ "version": "0.99.2",
4
4
  "description": "Lightning Web Component bindings for Luvio",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,12 +24,12 @@
24
24
  "watch": "yarn build --watch"
25
25
  },
26
26
  "dependencies": {
27
- "@luvio/engine": "0.99.1",
27
+ "@luvio/engine": "0.99.2",
28
28
  "@lwc/engine-core": "2.11.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@luvio/adapter-test-library": "0.99.1",
32
- "@luvio/cli": "0.99.1",
31
+ "@luvio/adapter-test-library": "0.99.2",
32
+ "@luvio/cli": "0.99.2",
33
33
  "@lwc/jest-preset": "11.2.2"
34
34
  },
35
35
  "bundlesize": [