Add fragment name to ambiguous fragment update
This commit is contained in:
parent
6086a88216
commit
b09d38a1f2
|
|
@ -35,6 +35,7 @@ describe('Bookmarks', () => {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ModuleEditModeQuery: {},
|
||||||
InstrumentQuery: {
|
InstrumentQuery: {
|
||||||
instrument: {
|
instrument: {
|
||||||
contents: [
|
contents: [
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue