add base query for text cards
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import api from '@/api'
|
||||
import { print } from 'graphql/language/printer'
|
||||
import {
|
||||
TextsDepart, TextRef, TextdepartRecursive
|
||||
TextsDepart, TextCard, TextdepartRecursive
|
||||
} from '@/api/queries'
|
||||
import TextdepartRecursiveWithDepth from '@/api/queries/TextdepartRecursiveWithDepth.gql'
|
||||
|
||||
@@ -25,8 +25,8 @@ export default {
|
||||
},
|
||||
|
||||
'GET_TEXT' (store, { id }) {
|
||||
return api.post('', { query: print(TextRef), variables: { id } })
|
||||
.then(data => (data.data.data))
|
||||
return api.post('', { query: print(TextCard), variables: { id } })
|
||||
.then(data => (data.data.data.text))
|
||||
},
|
||||
|
||||
'GET_TREE' (store, id) {
|
||||
|
||||
Reference in New Issue
Block a user