|
@@ -1,11 +1,27 @@
|
|
|
import Vue from 'vue'
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
|
-// import Corpus from './modules/corpus'
|
|
|
+import api from '@/api'
|
|
|
+import { print } from 'graphql/language/printer'
|
|
|
+import TextRef from '@/api/queries/TextRef.gql'
|
|
|
+
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
+
|
|
|
+
|
|
|
export default new Vuex.Store({
|
|
|
modules: {
|
|
|
- // Corpus
|
|
|
+ },
|
|
|
+
|
|
|
+ state: {
|
|
|
+ },
|
|
|
+
|
|
|
+ mutations: {
|
|
|
+ },
|
|
|
+
|
|
|
+ actions: {
|
|
|
+ 'GET_TEXT' ({ state }, id) {
|
|
|
+ return api.post('', { query: print(TextRef), variables: { id } })
|
|
|
+ }
|
|
|
}
|
|
|
})
|