0.18.2 • Published 5 years ago

graphql-codegen-apollo-angular-template v0.18.2

Weekly downloads
3,066
License
-
Repository
-
Last release
5 years ago

TypeScript Apollo Angular Template

This template generates Apollo services (Query, Mutation, Subscription) with TypeScript typings. This template is extended version of TypeScript template, so the configuration is same with graphql-codegen-typescript-template.

  • Example Input
query MyFeed {
  feed {
    id
    commentCount
  }
}
  • Example Usage
import { MyFeedGQL } from './graphql';

@Component({
  selector: 'feed',
  template: `
    <h1>Feed:</h1>
    <ul>
      <li *ngFor="let item of feed | async"> {{item.id}} </li>
    </ul>
  `
})
export class FeedComponent {
  feed: Observable<any>;

  constructor(feedGQL: MyFeedGQL) {
    this.feed = feedGQL.watch().valueChanges.pipe(map(result => result.data.feed));
  }
}

Generator Config

This generator supports custom config and output behavior. Use to following flags/environment variables to modify your output as you wish:

noGraphqlTag (or CODEGEN_NO_GRAPHQL_TAG, default value: false)

This will cause the codegen to output parsed documents and not use a literal tag of graphql-tag package.

0.18.2

5 years ago

0.18.1

5 years ago

0.18.1-alpha.16

5 years ago

0.18.1-alpha.6

5 years ago

0.18.0

5 years ago

0.17.0

5 years ago

0.16.1

5 years ago

0.16.0

5 years ago

0.15.2

5 years ago

0.15.1

5 years ago

0.15.0

5 years ago

0.14.5

5 years ago

0.14.4

5 years ago

0.14.3

5 years ago

0.14.2

5 years ago

0.14.1

5 years ago

0.14.0

5 years ago

0.13.0

6 years ago

0.12.6

6 years ago

0.12.5

6 years ago

0.12.4

6 years ago

0.12.3

6 years ago

0.12.2

6 years ago

0.12.1

6 years ago

0.12.0

6 years ago

0.11.0

6 years ago

0.11.0-alpha.0

6 years ago