nestjs-apollo-client

[![Build Status](https://github.com/zman2013/nestjs-apollo-client/workflows/Build%20and%20Release/badge.svg)](https://github.com/zman2013/nestjs-apollo-client/workflows/Build%20and%20Release/badge.svg) [![Coverage Status](https://coveralls.io/repos/github

Usage no npm install needed!

<script type="module">
  import nestjsApolloClient from 'https://cdn.skypack.dev/nestjs-apollo-client';
</script>

README

nestjs-apollo-client

Build Status Coverage Status npm

A nestjs module implementation of a client for Apollo(https://github.com/ctripcorp/apollo), the reliable configuration management system.

This module is registered in the global scope.

Usage

npm install nestjs-apollo-client 

example1

// app.module.ts
// refresh config every 10_000 milliseconds
@Module({
  imports: [ApolloModule.forRootAsync(new Meta("http://xxx", "appId"), 10_000)]
})
export class AppModule {}

// app.controller.ts
@Controller()
export class AppController {
  constructor(private readonly appService: AppService,
      private readonly _apolloService: ApolloService
    ) {}
  ...
}

Github

https://github.com/zman2013/nestjs-apollo-client