moya.config.ts
366 Bytes
import {InMemoryCache} from "apollo-cache-inmemory";
import {HttpLink} from "apollo-angular-link-http";
export const MOYA_BASE_URL = '/MoyaWeb/';
export const MOYA_REST_URL = MOYA_BASE_URL + 'rest/';
export function createApollo(httpLink: HttpLink) {
return {
link: httpLink.create({uri: MOYA_REST_URL + '/graphql'}),
cache: new InMemoryCache(),
};
}