We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4e82c0 commit fe47b30Copy full SHA for fe47b30
src/resolver/Mutation/create.js
@@ -1,7 +1,7 @@
1
export default (entityData = []) => (_, entity) => {
2
const newId =
3
entityData.length > 0 ? entityData[entityData.length - 1].id + 1 : 0;
4
- const newEntity = Object.assign(entity, { id: newId });
+ const newEntity = Object.assign({}, entity, { id: newId });
5
entityData.push(newEntity);
6
return newEntity;
7
};
0 commit comments