Let's get started by creating the tables and relationships for the Slack app.
Download the hasura project with migrations
- Clone the learn-graphql repo. Execute the following commands in your terminal:
git clone --filter=blob:none --sparse [email protected].com:hasura/learn-graphql.gitcd learn-graphqlgit sparse-checkout init --conegit sparse-checkout add tutorials/backend/hasura-auth-slack/slack-backend
- Navigate to the
Configure the endpoint to point to the Hasura Cloud app URL. Open the
config.yaml file and set the endpoint value.
version: 3endpoint: https://ready-panda-91.hasura.app...
Note: Your endpoint will be different based on your Hasura project.
Now let's apply the migrations.
hasura metadata apply --admin-secret xxxxhasura migrate apply --database-name default --admin-secret xxxxhasura metadata reload --admin-secret xxxx
Note: When you apply metadata, you might initially get the warning saying,
Metadata is inconsistent. This comes up because the tables are actually not yet created and will not be a problem once you do the
migrate apply step.
This will create the tables and relationships for the slack app.
Great! Now navigate to the Hasura Console to see the tables with relationships.
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs