Skip to content

d12/graphql-remote_loader_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Remote Loader Example App

This is a simple Rails app showing how to use graphql-remote_loader. This app exposes a GraphQL API with fields backed by the GitHub GraphQL API.

Important files

There are four relevant files when it comes to understanding how graphql-remote_loader is used. To learn how the example app works, read the inline comments in each file:

  1. http://github.com/d12/graphql-remote_loader_example/blob/master/app/graphql/types/query_type.rb
  2. https://github.com/d12/graphql-remote_loader_example/blob/master/app/graphql/loaders/github_loader.rb
  3. http://github.com/d12/graphql-remote_loader_example/blob/master/config/application.rb
  4. http://github.com/d12/graphql-remote_loader_example/blob/master/app/graphql/graphql_remote_loader_example_schema.rb

Running locally

First, install the gems:

bundle install

Done! To run the app:

TOKEN=$GITHUB_TOKEN rails server

Authorization

This app is configured to use a GitHub personal access token provided as an ENV variable at runtime.

In a real world application, authorization would be more robust.

About

An example app showing how to use graphql-remote_loader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published