OpenComponents Registry GraphQL Express middleware.
npm add oc-registry-graphql-express-middleware
require('babel-core/register');
require('babel-polyfill');
const graphql = require('oc-registry-graphql-express-middleware');
const options = {
baseUrl: configuration.baseUrl,
graphiql: configuration.discovery,
dependencies: configuration.dependencies
};
registry.app.use('/graphql', graphql(options));
N.B.:
configuration
in the example above is the object used to configure the OpenComponents Registry.