Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/97-jeffrey/graphql-practice
Practice of GraphQL for querying the data.
https://github.com/97-jeffrey/graphql-practice
express-graphql graphql
Last synced: 4 days ago
JSON representation
Practice of GraphQL for querying the data.
- Host: GitHub
- URL: https://github.com/97-jeffrey/graphql-practice
- Owner: 97-Jeffrey
- Created: 2021-03-14T20:06:21.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-23T05:42:21.000Z (almost 4 years ago)
- Last Synced: 2023-03-07T22:53:23.384Z (almost 2 years ago)
- Topics: express-graphql, graphql
- Language: JavaScript
- Homepage:
- Size: 1020 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Practices of GraphQL:
## The first part covers practices of GraphQL in express:
### There are two resources:
`author` and `book`.
A author have a list of books, a book belongs to a single author.### By using GraphQL, querying data from resources become easy:
![](https://github.com/97-Jeffrey/graphQL-practice/blob/master/doc/Screen%20Shot%202021-03-14%20at%209.08.46%20PM.png?raw=true)
## The second part is a little project in folder "tiny project"
I used data from `https://countries.trevorblades.com/` and used GraphQL to query data in my javaScript files. The dropdown list has all the continents. by selecting a continent, all countries in that continent are rendered.
![](https://github.com/97-Jeffrey/graphQL-practice/blob/master/doc/Screen%20Shot%202021-03-21%20at%208.44.25%20PM.png?raw=true)
In the HTML, when the continent is changed, country lists are changed.
![](https://github.com/97-Jeffrey/graphQL-practice/blob/master/doc/Screen%20Shot%202021-03-21%20at%208.45.22%20PM.png?raw=true)