@kamilkisiela/dr7y8ragyzk
v1.0.0-beta.0
Published
The easiest way to get started with Apollo Client in Angular
Downloads
2
Readme
Apollo Angular Boost
Purpose
Installation
npm install apollo-angular-boost --save
Usage
import {HttpClientModule} from '@angular/common/http';
import {ApolloBoostModule, ApolloBoost} from 'apollo-angular-boost';
@NgModule({
imports: [HttpClientModule, ApolloBoostModule],
})
export class AppModule {
constructor(apolloBoost: ApolloBoost) {
apolloBoost.create({
uri,
});
}
}
import {Apollo, gql} from 'apollo-angular-boost';
export class AppComponent {
constructor(apollo: Apollo) {
const allPosts = apollo.watchQuery({
query: gql`
query allPosts {
posts {
id
title
text
}
}
`,
});
// ...
}
}