Skip to content

Example repo with React/Apollo web and mobile client and GraphQL server powered by Prisma DB

Notifications You must be signed in to change notification settings

ChrisLFieldsII/react-apollo-hooks-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

The main purpose of this repo is getting familiar with using React Hooks in combination with the Apollo GraphQL Client and their use of Hooks.

To give further context, a project I'm working on, I am wanting to replace some logic with hooks but for some reason the useSubscription() hook is always stuck loading... So I wanted to test the hooks in a fresh project; and they work!! 🎉🎊

This repo contains examples of:

Server

GraphQL server powered by Prisma which includes support for subscriptions out-of-the-box!

So far it just includes queries/mutations/subscriptions for one data type: User

There are no APIs used, no auth, so the backend is fairly simple.

This is a great link to learn how to run the server with Docker and docker-compose.

howtographql.com is a great reference to learn how to add additional types/functionality to the server

Web

A web frontend created with create-react-app which uses the react-apollo pkg to make requests to the server.

Allows creating/updating/deleting of Users with subscriptions so other Users get notified.

Files located in web/src/screens/User/

Web UI Images

Mobile

A React Native app created with react-native init which uses the react-apollo pkg to make requests to the server.

Allows creating/updating/deleting of Users with subscriptions so other Users get notified.

Files located in mobile/src/screens/User

Mobile UI Images

About

Example repo with React/Apollo web and mobile client and GraphQL server powered by Prisma DB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published