https://github.com/ffcabbar/graphql-yoga-example
A simple example of a graphql server.
https://github.com/ffcabbar/graphql-yoga-example
graphql graphql-yoga playground
Last synced: about 1 month ago
JSON representation
A simple example of a graphql server.
- Host: GitHub
- URL: https://github.com/ffcabbar/graphql-yoga-example
- Owner: ffcabbar
- Created: 2020-03-02T07:14:33.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T03:21:23.000Z (over 2 years ago)
- Last Synced: 2025-02-15T19:49:02.173Z (3 months ago)
- Topics: graphql, graphql-yoga, playground
- Language: JavaScript
- Size: 363 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql-yoga-example
A simple example of a graphql server.# Eat and Fun
This directory contains a simple "Random Eat and Fun" example based on `graphql-yoga`.
## Get started
**Clone the repository:**
```sh
git clone https://github.com/ffcabbar/graphql-yoga-example.git
```**Install dependencies and run the app:**
```sh
yarn install # or npm install
yarn start # or npm start
```## Testing
Open your browser at [http://localhost:4000](http://localhost:4000) and start sending queries.
**Query:**
```graphql
query {
whatsForFun
whatsForDinner
}
```The server returns the following response:
```json
{
"data": {
"whatsForDinner": "Tonight we eat 🥗",
"whatsForFun": "Fun 🎃"
}
}
```## Playground
