Add fragment name to ambiguous fragment update

This commit is contained in:
Ramon Wenger 2024-02-28 12:08:12 +01:00
parent 6086a88216
commit b09d38a1f2
2 changed files with 5 additions and 0 deletions

View File

@ -35,6 +35,7 @@ describe('Bookmarks', () => {
],
},
},
ModuleEditModeQuery: {},
InstrumentQuery: {
instrument: {
contents: [

View File

@ -137,12 +137,15 @@ export const constructNoteMutation = (n) => {
});
} else {
let fragment = MODULE_FRAGMENT;
const fragmentName = 'ModuleParts';
let id = store.identify({
__typename: 'ModuleNode',
slug: n.parent,
});
const module = store.readFragment({
fragment,
fragmentName,
id,
});
let bookmark = {
@ -155,6 +158,7 @@ export const constructNoteMutation = (n) => {
};
store.writeFragment({
fragment,
fragmentName,
id,
data,
});