mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
d9afcc1857
NPM v7 uses a new (backwards-compatible) lockfile format. This upgrades all our various _package-lock.json_ files to use the new format. It's much more verbose so that NPM can be a lot faster. I figured it was cleaner to do this once in a separate PR rather than upgrading them in combination with adding or upgrading a new dependency. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5869 GitOrigin-RevId: 322fb63b96e2d873a4a3cc05fa6c7afa414716ce |
||
---|---|---|
.. | ||
auth-server | ||
hasura | ||
react-app | ||
README.md |
WhatsApp Clone
The react client is a forked version of urigo/whatsapp-client-react and the server is backed by Hasura GraphQL Engine
- Checkout the live app.
- Explore the backend using Hasura Console.
Running the app yourself
Deploy Postgres and GraphQL Engine on Hasura:
-
Deploy GraphQL Engine on Hasura Cloud and setup PostgreSQL via Heroku:
-
Get the Hasura app URL (say
whatsapp-clone.hasura.app
) -
Clone this repo:
git clone https://github.com/hasura/graphql-engine cd graphql-engine/community/sample-apps/whatsapp-clone-typescript-react
-
Apply the migrations:
cd hasura hasura metadata apply --endpoint "https://whatsapp-clone.hasura.app" hasura migrate apply --endpoint "https://whatsapp-clone.hasura.app"
Run the auth server
cd auth-server
-
Set the environment variables in
.env
-
Install and run the app
npm install
npm start
Run the react app
cd react-app
- Set the environment variables in
.env
yarn install
-
Modify the codegen.yml to include the correct endpoint and headers
-
Generate the graphql types by running
gql-gen
This would generate the required types in src/graphql/types
- Run the app
yarn start