Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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.

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)