add base query for text cards

This commit is contained in:
axolotle
2021-03-09 16:04:50 +01:00
parent 62ebb0a807
commit a81079bf60
4 changed files with 70 additions and 6 deletions
+3 -3
View File
@@ -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) {