Not able to see links getting error

Hi,
I am getting below error on my deployed application but not on local server. Not sure what is the issue and how to fix it. please help.

GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed.

The problem is that you have not set that property on your instance of GraphLinksModel. Maybe you have loaded an old model that did not have that property set?

I cannot explain why your local development or testing scenario is different.

Hi Walter,

We are using LayeredDigraphLayout and not using GraphLinksModel anywhere in the code, everything was working fine and there are no code change since a month and suddenly it stopped working with the above mentioned error.

Can you please help us understand the issue or do we need to set linkKeyProperty somewhere ?

PS. We are rendering diagram using goj-react.

Thanks

I guess the obvious question is: what changed a month ago?

The gojs-react component does require that every GraphLinksModel has its GraphLinksModel.linkKeyProperty be set so that the component can identify different links by key rather than by reference. But that has always been the case with gojs-react, so the problem is not that you have updated your version of gojs or of gojs-react.

Check that every place you construct a new GraphLinksModel that you immediately set the GraphLinksModel.linkKeyProperty. And (what I was suggesting in my previous reply) that every model that you have saved and then load via Model.fromJson also have that property set. That property is normally saved by Model.toJson and restored by Model.fromJson, but if you have an old model saved that way before you set the linkKeyProperty, the saved model re-created by Model.fromJson won’t have that property set on it.