Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alexsedeke/apollo-server-playground

Template or playground for Apollo-Server (GraphQL)
https://github.com/alexsedeke/apollo-server-playground

Last synced: 2 months ago
JSON representation

Template or playground for Apollo-Server (GraphQL)

Awesome Lists containing this project

README

        

# apollo-server-playground

![GitHub actions test coverage](https://github.com/alexanderVu/apollo-server-playground/workflows/Test%20Coverage/badge.svg)
[![codecov](https://codecov.io/gh/alexanderVu/apollo-server-playground/branch/master/graph/badge.svg)](https://codecov.io/gh/alexanderVu/apollo-server-playground)
[![Known Vulnerabilities](https://snyk.io/test/github/alexanderVu/apollo-server-playground/badge.svg?targetFile=package.json)](https://snyk.io/test/github/alexanderVu/apollo-server-playground?targetFile=package.json)

> Template or playground for Apollo-Server (GraphQL).

This project is not for teaching GraphQL neither nor Apollo-Server. It is a help to quickly set up a API based on Apollo GraphQL Server.

[![js-standard-style](https://cdn.rawgit.com/standard/standard/master/badge.svg)](http://standardjs.com)

## Install

Use git to clone the repository.

```bash
git clone [email protected]:alexanderVu/apollo-server-playground.git
```

## Usage

```bash
cd apollo-server-playground
npm install
npm run serve
```

## CLI

* *serve* - Start the API with nodemon for hot reload during development
* *start* - Node default start script to start api in production
* *test* - Run all tests
* *test:unit* - Run jest test utility only
* *lint* - Run eslint standard
* *lint:fix* - Run eslint with fix option

## A top-level directory layout

> Folder structure options for Apollo Server

.
├── lib
│ ├── datasources # Data sources encapsulate fetching data
│ ├── directives # Schema custom directives
│ ├── schemas # GraphQL schemas and resolvers
│ ├── util # Helper files
│ └── context.js # Settings for Apollo Server context object
├── .env # loads environment variables into process.env
├── index.js # API start script
├── LICENSE
└── README.md

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)