fixed gql fragment bug
This commit is contained in:
		
										
											
												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
 | 
			
		||||
  mixins: {
 | 
			
		||||
    actions: {
 | 
			
		||||
      loadMaterialsGQL ({ dispatch }, { ids, gqlfragment, callBack, callBackArgs }) {
 | 
			
		||||
      loadMaterialsGQL ({ dispatch }, { ids, gqlfragment, gqlFragmentfields, callBack, callBackArgs }) {
 | 
			
		||||
        console.log('loadMaterialsGQL ids', ids)
 | 
			
		||||
 | 
			
		||||
        const ast = gql`{
 | 
			
		||||
          materiaux(ids: [${ids}]) {
 | 
			
		||||
            ...${gqlfragment}
 | 
			
		||||
            ...${gqlFragmentfields}
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        ${gqlfragment}
 | 
			
		||||
 
 | 
			
		||||
@@ -332,6 +332,7 @@ export default {
 | 
			
		||||
                dispatch('loadMaterialsGQL', {
 | 
			
		||||
                  ids: state.flagcolls[collid].items,
 | 
			
		||||
                  gqlfragment: materiauFlaglistGQL,
 | 
			
		||||
                  gqlFragmentfields: 'MateriauFlagListFields',
 | 
			
		||||
                  callBack: 'loadMaterialsCallBack',
 | 
			
		||||
                  callBackArgs: { collid: collid }
 | 
			
		||||
                }).then(() => {
 | 
			
		||||
@@ -370,6 +371,7 @@ export default {
 | 
			
		||||
          dispatch('loadMaterialsGQL', {
 | 
			
		||||
            ids: state.flagcolls[collid].items,
 | 
			
		||||
            gqlfragment: materiauFlaglistGQL,
 | 
			
		||||
            gqlFragmentfields: 'MateriauFlagListFields',
 | 
			
		||||
            callBack: 'loadMaterialsCallBack',
 | 
			
		||||
            callBackArgs: { collid: collid }
 | 
			
		||||
          })
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user