Skip to content

Commit ba14de3

Browse files
committed
Cookies
1 parent 609b84f commit ba14de3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dist/vuex-orm-apollo.esm.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8112,12 +8112,13 @@ var VuexORMApollo = /** @class */ (function () {
81128112
this.collectModels();
81138113
this.setupMethods();
81148114
this.httpLink = new HttpLink({
8115-
uri: options.url ? options.url : '/graphql'
8115+
uri: options.url ? options.url : '/graphql',
8116+
credentials: 'same-origin'
81168117
});
81178118
this.apolloClient = new ApolloClient({
81188119
link: this.httpLink,
81198120
cache: new InMemoryCache(),
8120-
connectToDevTools: true
8121+
connectToDevTools: this.debugMode
81218122
});
81228123
this.queryBuilder = new QueryBuilder(this.logger, this.getModel.bind(this));
81238124
}

src/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import QueryBuilder from './queryBuilder';
22
import { DocumentNode } from 'graphql';
3-
import {Arguments} from "./interfaces";
3+
import { Arguments } from './interfaces';
44

55
export default class Logger {
66
private readonly enabled: boolean;

src/vuex-orm-apollo.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@ export default class VuexORMApollo {
4545
this.setupMethods();
4646

4747
this.httpLink = new HttpLink({
48-
uri: options.url ? options.url : '/graphql'
48+
uri: options.url ? options.url : '/graphql',
49+
credentials: 'same-origin'
4950
});
5051

5152
this.apolloClient = new ApolloClient({
5253
link: this.httpLink,
5354
cache: new InMemoryCache(),
54-
connectToDevTools: true
55+
connectToDevTools: this.debugMode
5556
});
5657

5758
this.queryBuilder = new QueryBuilder(this.logger, this.getModel.bind(this));

0 commit comments

Comments
 (0)