@shopify/libra-rpc-graphql-server
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@shopify/libra-rpc-graphql-server

Build Status License: MIT npm version

Libra GraphQL Playground server

Installation

$ yarn add @shopify/libra-rpc-graphql-server

Usage

You can build a new express server by using createSchema and createContext from @shopify/libra-rpc-graphql

/* eslint-env node */
/* eslint-disable no-process-env */

import express from 'express';

import {
  createContext,
  createSchema,
  LibraNetwork,
} from '@shopify/libra-rpc-graphql';
import {
  applyMiddleware,
  createServer,
  defaults,
} from '@shopify/libra-rpc-graphql-server';

const port = 8080;
const path = defaults.path;
const app = applyMiddleware(
  createServer(createSchema(), {
    context: createContext(LibraNetwork.Testnet),
    path,
    tabs: {minter: true},
  }),
);

app.listen(port, () => {
  console.log(
    `🚀  GraphQL playground running at http://localhost:${port}${path}`,
  );
});

Readme

Keywords

none

Package Sidebar

Install

npm i @shopify/libra-rpc-graphql-server

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

20.1 kB

Total Files

24

Last publish

Collaborators

  • jaimie.rockburn
  • blittle
  • shopify-admin
  • maryharte
  • crisfmb
  • pmoloney89
  • netlohan
  • st999999
  • justin-irl
  • megswim
  • wcandillon
  • nathanpjf
  • shopify-dep
  • goodforonefare
  • lemonmade
  • vsumner
  • wizardlyhel
  • antoine.grant
  • tsov
  • andyw8-shopify
  • henrytao
  • hannachen
  • vividviolet
  • bpscott