Skip to content

skvale/react-postgraphile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

434bc95 Â· Dec 29, 2019

History

16 Commits
Aug 8, 2019
Apr 14, 2018
Dec 29, 2019
Aug 10, 2019
Aug 10, 2019
Aug 8, 2019
Aug 10, 2019
Aug 10, 2019
Aug 17, 2019
Sep 17, 2019
Aug 10, 2019
Aug 10, 2019
Sep 16, 2019
Sep 16, 2019
Dec 29, 2019
Aug 17, 2019
Aug 8, 2019
Dec 29, 2019

Repository files navigation

React Postgraphile

🚧

A React app communicating with a Postgresql database Using Urql and Postgraphile's API generation.

    .+------+     +------+     +------+     +------+.
  .' |    .'|    /|     /|     |\     |\    |`.    | `.
 +---+--+'  |   +-+----+ |     | +----+-+   |  `+--+---+
 |   |  |   |   | |    | |     | |    | |   |   |  |   |
 | React|  <-> graphql.js| <-> Postgraphile <-> Postgresql
 |.'    | .'    |/     |/       \|     \|    `. |   `. |
 +------+'      +------    \     +------+      `+------+
                            \
                             \ +------+
                               |\     |\
                               | +----+-+
                               | |    | |
                               .Github API
                                \|     \|
                                 +------+

You'll need

  • Postgresql
  • react-postgraphile git clone https://github.com/skvale/react-postgraphile

Starting it

Start Postgres

# for MacOS
brew services start postgres
# or
# postgres -D /usr/local/var/postgres

Create a database:

createdb react_postgraphile

Populate it

psql -f database/create.sql -d react_postgraphile

Start Postgraphile to create a Graphql layer over the created database

yarn run postgraphile

You can check your Graphql out at localhost:5000/graphql

Generate the Types from the running schema

yarn run types:gen

Run the React app in a new terminal

yarn start

About

React Apollo and Postgraphile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published