Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dex4er/ts-node-github-api-example

Example of Github API v4 client written in Typescript with Apollo library
https://github.com/dex4er/ts-node-github-api-example

Last synced: about 2 months ago
JSON representation

Example of Github API v4 client written in Typescript with Apollo library

Awesome Lists containing this project

README

        

# @dex4er/ts-node-github-api-example

[![Travis CI](https://secure.travis-ci.org/dex4er/ts-node-github-api-example.svg)](http://travis-ci.org/dex4er/ts-node-github-api-example) [![GitLab Pipelines](https://gitlab.com/dex4er/ts-node-github-api-example/badges/develop/build.svg)](https://gitlab.com/dex4er/ts-node-github-api-example/pipelines)

This is an example of Github API v4 client written in Typescript with Apollo library.

Additionaly this project provides a Gitlab pipeline configuration which
produces binary packages stored in artifacts repository:

## Requirements

This package requires ES6 with Node >= 8.

## Usage

In working directory:

### dependencies

```shell
yarn
```

### token

```shell
cp .env.example.sh .env
edit .env
```

### schema offline

```shell
git submodule sync
git submodule update --init
# to download the latest later:
git submodule update --remote
```

### schema online

```shell
yarn github-apiv4-get-schema
```

### schema download for offline

```shell
yarn github-apiv4-get-stubby
```

### schema to typescript

```shell
yarn codegen
```

### compile

```shell
yarn compile
```

### run offline for testing

```shell
yarn github-apiv4-viewer-query:stubby
```

### run online

```shell
yarn github-apiv4-viewer-query
```

## License

Copyright (c) 2019 Piotr Roszatycki

[MIT](https://opensource.org/licenses/MIT)