@parameter1/omeda-graphql-client-express

1.0.0 • Public • Published

Omeda GraphQL Express Middleware

Express middleware for creating and using the Omeda GraphQL client

Installation

yarn add @parameter1/omeda-graphql-client-express

Usage

The middleware can be applied globally to Express, or on a per-route (or per-router) basis.

const express = require('express');
const omedaGraphQL = require('@parameter1/omeda-graphql-client-express');

const app = express();

// the client will be globally available on `req.$omeda` and `res.locals.$omeda`
app.use(omedaGraphQL({
  uri: 'https://graphql.omeda.parameter1.com',
  brandKey: 'yourbrandkey',
  appId: 'your app id',
  inputId: 'your input id',
}));

Readme

Keywords

none

Package Sidebar

Install

npm i @parameter1/omeda-graphql-client-express

Weekly Downloads

733

Version

1.0.0

License

MIT

Unpacked Size

3.71 kB

Total Files

4

Last publish

Collaborators

  • b77mills
  • brandonbk
  • zarathustra323
  • solocommand