partial ng12 migration

This commit is contained in:
2024-08-26 01:10:45 -04:00
parent 59473912e2
commit 93835fdf86
10 changed files with 1818 additions and 2613 deletions
+28 -28
View File
@@ -9,40 +9,40 @@ import {Apollo, ApolloModule} from 'apollo-angular';
import {HttpLink, HttpLinkModule} from 'apollo-angular-link-http';
import {DefaultOptions} from 'apollo-client';
import {InMemoryCache} from 'apollo-cache-inmemory';
import {HttpClientModule} from '@angular/common/http';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {HttpClientModule} from "@angular/common/http";
export function app_Init(apollo: Apollo, httpLink: HttpLink) {
return async () => {
const defaultOptions: DefaultOptions = {
watchQuery: {
fetchPolicy: 'no-cache',
errorPolicy: 'ignore',
},
query: {
fetchPolicy: 'network-only',
errorPolicy: 'all',
},
mutate: {
fetchPolicy: 'no-cache',
},
};
apollo.createDefault({
link: httpLink.create({ uri: 'https://localhost:5001' }),
cache: new InMemoryCache(),
defaultOptions: defaultOptions,
});
apollo.createNamed('command', {
link: httpLink.create({ uri: 'https://localhost:6001' }),
cache: new InMemoryCache(),
defaultOptions: defaultOptions,
});
return new Promise((resolve, reject) => {
resolve();
const defaultOptions: DefaultOptions = {
watchQuery: {
fetchPolicy: 'no-cache',
errorPolicy: 'ignore',
},
query: {
fetchPolicy: 'network-only',
errorPolicy: 'all',
},
mutate: {
fetchPolicy: 'no-cache',
},
};
apollo.createDefault({
link: httpLink.create({ uri: 'https://localhost:5001' }),
cache: new InMemoryCache(),
defaultOptions: defaultOptions,
});
apollo.createNamed('command', {
link: httpLink.create({ uri: 'https://localhost:6001' }),
cache: new InMemoryCache(),
defaultOptions: defaultOptions,
});
resolve(true);
});
};
}
+1 -1
View File
@@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
+1 -1
View File
@@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
+1 -1
View File
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,