-
-
Notifications
You must be signed in to change notification settings - Fork 311
Expand file tree
/
Copy pathapp.config.ts
More file actions
25 lines (23 loc) · 803 Bytes
/
app.config.ts
File metadata and controls
25 lines (23 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { provideApollo } from 'apollo-angular';
import { HttpLink } from 'apollo-angular/http';
import { provideHttpClient } from '@angular/common/http';
import { ApplicationConfig, inject, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { InMemoryCache } from '@apollo/client/core';
import { routes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideHttpClient(),
provideApollo(() => {
const httpLink = inject(HttpLink);
return {
link: httpLink.create({
uri: 'https://swapi-graphql.netlify.app/graphql',
}),
cache: new InMemoryCache(),
};
}),
],
};