add missing api query 'allNodes'
This commit is contained in:
+8
-1
@@ -1,7 +1,7 @@
|
||||
import axios from 'axios'
|
||||
import { print } from 'graphql/language/printer'
|
||||
|
||||
import { Node, Nodes, NodesTrees } from '@/api/queries'
|
||||
import { Node, Nodes, AllNodesOfVariant, NodesTrees } from '@/api/queries'
|
||||
import * as nodesFragments from '@/api/fragments'
|
||||
|
||||
|
||||
@@ -45,6 +45,13 @@ export default {
|
||||
}).then(response => response.data.data)
|
||||
},
|
||||
|
||||
queryAllNodes (variantId, levels) {
|
||||
return api.post('', {
|
||||
query: this.getQueryString(AllNodesOfVariant, levels),
|
||||
variables: { variantId }
|
||||
}).then(response => response.data.data)
|
||||
},
|
||||
|
||||
queryRecursiveNodes (ids, depth = 4) {
|
||||
const baseQuery = print(NodesTrees)
|
||||
const prodFragment = `
|
||||
|
||||
Reference in New Issue
Block a user