2017-11-22 16:28:16 -05:00
2017-09-29 12:45:01 -07:00
2017-11-20 13:01:21 -05:00
2017-10-10 11:48:55 -04:00
2017-09-29 12:45:01 -07:00
2017-10-10 11:48:55 -04:00
2017-09-29 12:45:01 -07:00
2017-11-22 16:28:16 -05:00
2017-11-22 16:28:16 -05:00
2017-11-10 14:39:46 -08:00
2017-09-29 12:45:01 -07:00
2017-11-06 15:51:42 -05:00
2017-10-03 15:32:39 +11:00

Apollo Engine

npm version Build Status

This package integrates the Apollo Engine proxy with your GraphQL server.

When installed, it starts the Apollo Engine proxy in a new process, then routes GraphQL requests through that proxy:

Sequence Diagram

Release Notes

Please see our Release Notes in the Engine documenation.

Usage

import { Engine } from 'apollo-engine';

// create new engine instance from JS config object
const engine = new Engine({ engineConfig: { ... } });

// create new engine instance from file
const engine = new Engine({ engineConfig: 'path/to/config.json' });

await engine.start();
app.use(engine.expressMiddleware());

// ...
// other middleware / handlers
// ...

To shut down engine

engine.stop();

The graphql server should have tracing enabled if available. If you are using Apollo Server (v1.1.0 or newer), enable the tracing: true configuration option.

Minimum Engine Configuration

This is the minimum necessary information in the engine configuration object to enable sending tracing and telemetry information.

{
  "apiKey": "service:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Full Engine Configuration

See the documentation section on configuring the proxy

S
Description
Apollo Engine middleware for Node
Readme
211 KiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 62.7%
TypeScript 37.3%