Skip to content
/ graphql Public

A backend API with apollo-server to provide a simple query and a mutation. An Apollo web client and a Relay web client to consume the same API. the main goal is to try out both ways to create a Graphqll client

Notifications You must be signed in to change notification settings

arenac/graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GraphQl Sever and clients

Server

A GraphQl server with dummy data using apollo-server.

Run

Install the dependencies and start the node server from the backend folder

yarn && yarn start

Apollo client

A ReactJs application using the apollo client.

Run

Install the dependencies and start the node server from the gql-apollo-client folder

yarn && yarn start

Relay client

A ReactJs application using relay.

Run

Install the dependencies and start the node server from the gql-relay folder

yarn && yarn start

Considerations

Apollo client is a way easier to implement in this very simple application and it's technology agnostic, has hooks support which help to create a query or mutation in an ewasy way. It has also a lot of not explored features in this PoC that can be implemented gradually.

In the other hand, Relay is a bit more complex to implement, you need to match the file name with the queries/mutation body contend to be able to generate the fragments (through the CLI). But it works very well, seems to be powerfull and maybe fits better in large applications.

About

A backend API with apollo-server to provide a simple query and a mutation. An Apollo web client and a Relay web client to consume the same API. the main goal is to try out both ways to create a Graphqll client

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published