Invariant Violation in EntityStorageMutation


We are using some of the querying components of NR1 SDK, one of them being EntityStorageMutation which worked fine until now, but the last couple of days we are getting this error:

There haven’t been any changes in the way this methods is used in our applications, and I tried it in a clean new app as well and I get the same error.
The nr1 version I’m currently running: @datanerd/nr1/1.35.3 darwin-x64 node-v10.24.0.

The error isn’t very descriptive, from what I could find online it’s related to some missing field, but nothing has changed on the fields being sent. Example of how we’re using it:

			actionType: EntityStorageMutation.ACTION_TYPE.WRITE_DOCUMENT,
			collection: "test-collection",
			entityGuid: "myEntityGUIDhere",
			documentId: "1",
			document: { field1: "value1", field2: "value2", field3: 45 },

I am not sure if I’m missing something obvious or if something changed in the implementation of EnityStorageMutation. I tried doing the same operation witha GraphQL query directly, using NerdGraphMutation instead and it works just fine, but we are using this in many parts of the app and I would like to avoid having to update all of them if this can be fixed.

Any insight or help on this would be greatly appreciated! :slight_smile:

Thank you!

@ilda.balliu Following up to see if you were able to find a solution? Also tagging @dgolden to see if they have any suggestions for this.


No we didn’t find any solution to it. We just rewrote the methods to use a GraphQL query.
If there is another solution or a reason why this was happening, we’d be glad to know.

1 Like