Skip to content

Commit

Permalink
Add Apollo config file
Browse files Browse the repository at this point in the history
  • Loading branch information
geraosio committed Aug 5, 2020
1 parent d142ebe commit 86021bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions apollo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
client: {
includes: ['src/**/*.{js,jsx,ts,tsx,vue,gql}'],
service: {
name: 'andon'
// url: 'http://localhost:4000/graphql' // Test local developments
}
}
}
4 changes: 2 additions & 2 deletions src/apollo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { InMemoryCache } from 'apollo-cache-inmemory'
Vue.use(VueApollo)

const httpLink = createHttpLink({
uri: `${process.env.VUE_APP_API_ENDPOINT}graphql`,
uri: `${process.env.VUE_APP_API_ENDPOINT}graphql`
})

const cache = new InMemoryCache()

const apolloClient = new ApolloClient({
link: httpLink,
cache,
cache
})

const apolloProvider = new VueApollo({
Expand Down

0 comments on commit 86021bb

Please sign in to comment.