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: { InstrumentQuery: {
instrument: { instrument: {
contents: [ contents: [

View File

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