question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make returned data extensible

See original GitHub issue

I’m running into a situation where I need another plugin (ngx-datatable) to be able to modify the data being returned from the server. Right now it’s unable to do so because the data is not extensible.

ngOnInit(): void {
    this._apollo.watchQuery({
        query: getAllTheThings
    }).subscribe(({data, loading}) => {
        console.log(Object.isExtensible(data['theThings')); // false
    });
}

It would be super helpful if this was mutable out of the box. Failing that, does anyone have a suggestion as to how to maintain the observable state of the data but allow the other plugin to modify it?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
manuelfinkcommented, Feb 3, 2017
Import * as _ from 'lodash';
...
Let copyOfData = _.cloneDeep(data);
0reactions
kamilkisielacommented, Feb 4, 2017

Closing this. If you think this still need to be opened, @mention me 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make returned data extensible · Issue #272 - GitHub
I'm running into a situation where I need another plugin (ngx-datatable) to be able to modify the data being returned from the server....
Read more >
Why does Apollo/GraphQL return a non extensible object?
I'm building an app with VueJS and I'm using Apollo client to fetch data from a database through ...
Read more >
Extensible Objects - WCF - Microsoft Learn
The extensible object pattern is used to either extend existing runtime classes with new functionality or to add new state to an object....
Read more >
Object.isExtensible() - JavaScript - MDN Web Docs
The Object.isExtensible() method determines if an object is extensible (whether it can have new properties added to it).
Read more >
10 Using Extensible Optimizer - Oracle Help Center
The Extensible Optimizer feature lets you define statistics collection functions for domain indexes, indextypes, data types, individual table columns, and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found