Skip to content

Commit 946c8ad

Browse files
committed
Make api path configurable
1 parent 86aec87 commit 946c8ad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ In your component:
5757
## Possible options:
5858

5959
- `database` (required): The Vuex-ORM database.
60+
- `url` (optional, default: '/graphql'): The URL to the graphql api. Will be passed to apollo-client.
6061
- `debug` (optional, default: false): Set to true to activate the debug logging.
6162

6263

src/vuex-orm-apollo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class VuexORMApollo {
4545
this.setupMethods();
4646

4747
this.httpLink = new HttpLink({
48-
uri: '/graphql'
48+
uri: options.url ? options.url : '/graphql'
4949
});
5050

5151
this.apolloClient = new ApolloClient({

0 commit comments

Comments
 (0)