GithubHelp home page GithubHelp logo

wooodhead / apollo-subscriptions-book-club Goto Github PK

View Code? Open in Web Editor NEW

This project forked from react-native-training/apollo-subscriptions-book-club

0.0 1.0 0.0 702 KB

Book Aggregation App using Apollo + GraphCool Subcriptions

JavaScript 54.57% Python 10.40% Java 8.50% Objective-C 26.54%

apollo-subscriptions-book-club's Introduction

Apollo + Graphcool Subscription Book App

To get started:

  1. Clone the repository
git clone https://github.com/dabit3/apollo-subscriptions-book-club.git
  1. cd into directory
cd apollo-subscriptions-book-club
  1. Install dependencies
yarn
# or npm install
  1. Install Graphcool CLI
npm install -g graphcool
  1. Create GraphQL server
graphcool init --schema ./schema.graphql --name BookClub

From the terminal output, you need to grab the project ID and use it in the next step. This ID is also available in the generated project file project.graphcool.

Note: If you need to find out the available endpoints for your project, you can simply use the graphcool endpoints command (in the directory where project.graphcool is located) or grab them from the Graphcool Console.

  1. Configure endpoints

Open app/index.js and set the projectId variable to your project ID from the previous step. The project ID will be used to configure the endpoints for the GraphQL API as well as for the subscriptions:

// Add your own project ID here
const projectId = '__YOUR_PROJECT_ID__'

// Endpoint for the Subscriptions API
const wsClient = new SubscriptionClient(`wss://subscriptions.graph.cool/v1/${projectId}`, {
  reconnect: true
});

// Endpoint for the regular GraphQL API
const networkInterface = createNetworkInterface({
  uri: `https://api.graph.cool/simple/v1/${projectId}`
});

apollo-subscriptions-book-club's People

Contributors

dabit3 avatar nikolasburk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.