Skip to content

A Github GraphQL proxy server built on the Apollo GraphQL server

License

Notifications You must be signed in to change notification settings

szaske/apollo-github-proxy-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Proxy GraphQL Server

Developed by szaske

A GraphQL server that proxies the Github GraphQL service. The server accepts GraphQL queries from clients and resolves them by passing the queries on to Github's own service. If you're looking for code examples of a proxy GraphQL server this repo will be helpful to you. Unique working code that can be found here includes:

  • How to construct a github GraphQL query using node-fetch, including creating authorization headers and passing custom variables
  • A design pattern for transforming the query data before send it along to clients

Getting Started

Like most development projects this code requires that you have some basic development tools installed on your development system; Git, Node.js and NPM. You'll also need a Github access token and and Apollo Engine API-KEY. You can find the instructions for creating a Github token here, and instructions for creating an Apollo Engine API-KEY here

Install

git clone https://github.com/szaske/apollo-github-proxy-server.git
cd apollo-github-proxy-server
npm install

Create a file called .env in the projects root folder

touch .env

This is where you'll store your Github access token and Engine API-KEY. Edit the file to include these lines:

GITHUB_TOKEN=[Put your access token here without brackets]
ENGINE_API_KEY=[Put your full Engine API-KEY here]

Now the server should run.

npm start

If you want to explore the servers functionality you can open http://localhost:4000/graphiql

Built With

License

This project is licensed under the MIT License - see the LICENSE file for details

About

A Github GraphQL proxy server built on the Apollo GraphQL server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published