Remove apollo link state

This commit is contained in:
Chocobozzz
2019-08-12 16:04:16 +02:00
parent 3fa2bd35d8
commit 6d221212ef
22 changed files with 415 additions and 148 deletions

7
js/src/types/apollo.ts Normal file
View File

@@ -0,0 +1,7 @@
import { ServerError, ServerParseError } from 'apollo-link-http-common';
function isServerError(err: Error | ServerError | ServerParseError | undefined): err is ServerError {
return !!err && (err as ServerError).statusCode !== undefined;
}
export { isServerError };

View File

@@ -1,7 +1,10 @@
import { ICurrentUser } from '@/types/current-user.model';
export interface ILogin {
user: ICurrentUser;
token: string;
export interface IToken {
accessToken: string;
refreshToken: string;
}
export interface ILogin extends IToken {
user: ICurrentUser;
}