npalm / graphql-rest-adapter-node

Examples GraphQL API on top of REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples GraphQL API on top of REST API

Project contains small show cases how to create an adapter to convert a traditional REST interface to GraphQL (backend).

  • apollo-link-rest: Using apollo link rest to build a GraphQL API to adapt a REST API GraphQL.
  • rest-axios Using axios to build a GraphQL API to adapt a REST API GraphQL.

Getting started

This project is build on top of a Java based GraphQL demo that exposes also a REST interface. This examples requires running this other demo first.

docker run -d --name graphql-java-demo --rm -p 8080:8080 npalm/graphql-java-demo:rest-service

Next you can choose either apollo-link-rest or rest-axios and start the server

cd apollo-link-rest
yarn && yarn start

Open your browser on http://localhost:4000

About

Examples GraphQL API on top of REST API

License:MIT License


Languages

Language:TypeScript 100.0%