fixed gql fragment bug
This commit is contained in:
parent
3114581e31
commit
090be459ef
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -34,12 +34,12 @@ export default createStore(Vuex.Store, {
|
||||||
// https://github.com/huybuidac/vuex-extensions
|
// https://github.com/huybuidac/vuex-extensions
|
||||||
mixins: {
|
mixins: {
|
||||||
actions: {
|
actions: {
|
||||||
loadMaterialsGQL ({ dispatch }, { ids, gqlfragment, callBack, callBackArgs }) {
|
loadMaterialsGQL ({ dispatch }, { ids, gqlfragment, gqlFragmentfields, callBack, callBackArgs }) {
|
||||||
console.log('loadMaterialsGQL ids', ids)
|
console.log('loadMaterialsGQL ids', ids)
|
||||||
|
|
||||||
const ast = gql`{
|
const ast = gql`{
|
||||||
materiaux(ids: [${ids}]) {
|
materiaux(ids: [${ids}]) {
|
||||||
...${gqlfragment}
|
...${gqlFragmentfields}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${gqlfragment}
|
${gqlfragment}
|
||||||
|
|
|
@ -332,6 +332,7 @@ export default {
|
||||||
dispatch('loadMaterialsGQL', {
|
dispatch('loadMaterialsGQL', {
|
||||||
ids: state.flagcolls[collid].items,
|
ids: state.flagcolls[collid].items,
|
||||||
gqlfragment: materiauFlaglistGQL,
|
gqlfragment: materiauFlaglistGQL,
|
||||||
|
gqlFragmentfields: 'MateriauFlagListFields',
|
||||||
callBack: 'loadMaterialsCallBack',
|
callBack: 'loadMaterialsCallBack',
|
||||||
callBackArgs: { collid: collid }
|
callBackArgs: { collid: collid }
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -370,6 +371,7 @@ export default {
|
||||||
dispatch('loadMaterialsGQL', {
|
dispatch('loadMaterialsGQL', {
|
||||||
ids: state.flagcolls[collid].items,
|
ids: state.flagcolls[collid].items,
|
||||||
gqlfragment: materiauFlaglistGQL,
|
gqlfragment: materiauFlaglistGQL,
|
||||||
|
gqlFragmentfields: 'MateriauFlagListFields',
|
||||||
callBack: 'loadMaterialsCallBack',
|
callBack: 'loadMaterialsCallBack',
|
||||||
callBackArgs: { collid: collid }
|
callBackArgs: { collid: collid }
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue