Add vue-apollo to user-app

It does not fetch anything yet.
It points to the graphql server on localhost, which is a hardcoded dev-mode.
Added config for GraphQL JS intellij plugin which inspects a "remote" graphql schema for better type hints in graphql queries in code
pull/6/head
Christoph Lienhard 2 years ago
parent 06a9fdf107
commit 13be951160
  1. 3
      .gitignore
  2. 15
      .graphqlconfig
  3. 829
      package-lock.json
  4. 6
      package.json
  5. 12
      src/main.js

3
.gitignore vendored

@ -23,3 +23,6 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*
# GraphQl plugin related
./postgraphile-schema.graphql

@ -0,0 +1,15 @@
{
"name": "Postgraphile Schema",
"schemaPath": "postgraphile-schema.graphql",
"extensions": {
"endpoints": {
"Remote SWAPI GraphQL Endpoint": {
"url": "http://localhost:5433/graphql",
"headers": {
"user-agent": "JS GraphQL"
},
"introspect": true
}
}
}
}

829
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -11,6 +11,9 @@
"admin": "node bin/admin-yml"
},
"dependencies": {
"apollo-boost": "^0.4.9",
"graphql": "^15.1.0",
"graphql-tag": "^2.10.3",
"lint-staged": "^8.1.5",
"register-service-worker": "^1.6.2",
"stylelint": "^10.0.0",
@ -18,6 +21,7 @@
"stylelint-processor-html": "^1.0.0",
"stylelint-webpack-plugin": "^0.10.5",
"vue": "^2.6.6",
"vue-apollo": "^3.0.3",
"vue-feather-icons": "^4.10.0",
"vue-i18n": "^8.10.0",
"vue-markdown": "^2.2.4",
@ -41,7 +45,7 @@
"eslint-plugin-vue": "^5.0.0",
"husky": "^1.3.1",
"js-yaml": "^3.13.1",
"node-sass": "^4.13.1",
"node-sass": "^4.14.1",
"normalize.css": "^8.0.1",
"ora": "^3.4.0",
"sass-loader": "^7.2.0",

@ -8,14 +8,26 @@ import storage from '@/helper/storage'
import '@/registerComponents'
import '@/registerServiceWorker'
import VueApollo from 'vue-apollo'
import ApolloClient from 'apollo-boost'
Vue.config.productionTip = false
Vue.use(VueSVGIcon)
Vue.use(storage)
Vue.use(VueApollo)
const apolloClient = new ApolloClient({
uri: 'http://localhost:5433/graphql'
})
const apolloProvider = new VueApollo({
defaultClient: apolloClient
})
new Vue({
i18n,
router,
apolloProvider,
data: {
backupStorage: {
answers: undefined,

Loading…
Cancel
Save