graphql-rest-transformer

1.0.2 • Public • Published

GraphQL-Rest

Allows you to query a GraphQL interface like you'd query a REST URL. I wrote this to help me learn GraphQL, but it might have some practical use as well, as a means of ensuring backwards compatibility with REST APIs.

Usage

npm install graphql-rest-transformer --save

then

import restToGraphQL from 'graphql-rest-transformer'

finally

app.get(RegExp("api/*"), restToGraphQL)

We use regex for the endpoint, so that anything beyond the api/ route is sent to the middleware.

TODO

  • add a way to specify fields you want

Package Sidebar

Install

npm i graphql-rest-transformer

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

10.9 kB

Total Files

7

Last publish

Collaborators

  • brianfitzgerald