Giter Club home page Giter Club logo

github-gql-js's Introduction

GitHub GraphQL JS

Starter template for querying GitHub's GQL API using Node

GitHub tag License

Made with Node.js Package - @octokit/graphql

Use this template

About

This repo demonstrates how to query GitHub's GraphQL API using Node.

The graphql NPM package is used. The content is based on the documentation here:

Installation

Clone

Clone this repo.

$ git clone [email protected]:MichaelCurrin/github-gql-js.git
$ cd github-gql-js

Install system packages

Install Node.js - see gist.

You also need make - standard on Linux and macOS. Otherwise run the commands directly in Makefile.

Install project packages

$ make install

Configuration

  1. Create a GitHub API token with appropriate permissions
  2. Copy the token value. Keep this secret and out of version control.
  3. Create a dotfile based on the template. This config file will be ignored by Git.
    $ cp .env.template .env
  4. Paste your token in the file.

Usage

$ make run

More info

GitHub APIs and tokens

GitHub GQL queries require an API token, unlike the REST API which does not.

Avoid using the browser to do your GQL queries - you'll risk exposing your token to others on the internet.

Rather run your logic using Node on a server or in a serverless function (AWS Lambda or Netlify Functions).

Resources

Related

License

Released under MIT by @MichaelCurrin.

github-gql-js's People

Contributors

michaelcurrin avatar

Watchers

 avatar  avatar  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.