How to use apollo-datasource-rest - 3 common examples

To help you get started, we’ve selected a few apollo-datasource-rest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erxes / erxes-widgets-api / src / data / resolvers / dataSources / engages.ts View on Github external
constructor() {
    super();

    const { ENGAGES_API_DOMAIN } = process.env;

    this.baseURL = ENGAGES_API_DOMAIN;
    this.httpCache = new HTTPCache();
  }
github erxes / erxes-api / src / data / dataSources / integrations.ts View on Github external
constructor() {
    super();

    const INTEGRATIONS_API_DOMAIN = getEnv({ name: 'INTEGRATIONS_API_DOMAIN' });

    this.baseURL = INTEGRATIONS_API_DOMAIN;
    this.httpCache = new HTTPCache();
  }
github erxes / erxes-api / src / data / dataSources / engages.ts View on Github external
constructor() {
    super();

    const ENGAGES_API_DOMAIN = getEnv({ name: 'ENGAGES_API_DOMAIN' });

    this.baseURL = ENGAGES_API_DOMAIN;
    this.httpCache = new HTTPCache();
  }

apollo-datasource-rest

This package exports a ([`RESTDataSource`](https://github.com/apollographql/apollo-server/tree/main/packages/apollo-datasource-rest)) class which is used for fetching data from a REST API and exposing it via GraphQL within Apollo Server.

MIT
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis

Popular apollo-datasource-rest functions

Similar packages