├── .gitignore
├── Dockerfile
├── README.md
├── app.json
├── assets
├── console.png
├── create_new_app_heroku.png
├── create_new_app_heroku_2.png
├── create_new_app_heroku_3.png
├── hasura_console.png
├── hasura_create_table.png
├── hasura_graphql_query.png
├── hasura_insert_row.png
├── heroku-create-new-app.png
└── heroku_connect_db.png
└── heroku.yml
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | *.temp
3 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM hasura/graphql-engine:v2.48.1
2 |
3 | # Enable the console
4 | ENV HASURA_GRAPHQL_ENABLE_CONSOLE=true
5 |
6 | # Enable debugging mode. It should be disabled in production.
7 | ENV HASURA_GRAPHQL_DEV_MODE=true
8 |
9 | # Heroku only allows to install extensions in the heroku_ext schema
10 | ENV HASURA_GRAPHQL_METADATA_DATABASE_EXTENSIONS_SCHEMA=heroku_ext
11 |
12 | # Heroku hobby tier PG has few limitations including 20 max connections
13 | # https://devcenter.heroku.com/articles/heroku-postgres-plans#hobby-tier
14 | ENV HASURA_GRAPHQL_PG_CONNECTIONS=15
15 |
16 | CMD HASURA_GRAPHQL_METADATA_DATABASE_URL=$DATABASE_URL graphql-engine \
17 | serve \
18 | --server-port $PORT
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hasura GraphQL Engine on Heroku
2 |
3 | [](https://github.com/hasura/graphql-engine)
4 |
5 |
6 |
7 |
8 | Hasura GraphQL Engine is a blazing-fast GraphQL server that gives you :zap: **instant,
9 | realtime GraphQL APIs over Postgres**, with [**webhook
10 | triggers**](https://github.com/hasura/graphql-engine/blob/master/event-triggers.md)
11 | on database events for asynchronous business logic.
12 |
13 | Hasura helps you build GraphQL apps backed by Postgres or incrementally move to
14 | GraphQL for existing applications using Postgres.
15 |
16 | Deploy Hasura GraphQL Engine on Heroku and get a GraphQL endpoint in under 30 seconds :clock1:
17 |
18 | Read more at [hasura.io](https://hasura.io) and the [docs](https://docs.hasura.io).
19 |
20 |
21 | ## Quickstart
22 |
23 | ### 1. Deploy to Heroku
24 | Deploy to Heroku and instantly get a realtime GraphQL API backed by Heroku Postgres:
25 |
26 | [](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)
28 |
29 | 
30 |
31 | ### 2. Open Hasura Console
32 |
33 | Once the deployment is complete, click on the `View` button as marked above.
34 | This will take you to the Hasura Console, where you can connect your database, create a table and make
35 | your first GraphQL query.
36 |
37 | 
38 |
39 | ### 3. Connect a database
40 |
41 | Head to the `Data` tab on the console and connect your database. If you do not have an existing database, you can connect to the
42 | Heroku Postgres database that was set up with your deployment using the `DATABASE_URL` env var.
43 |
44 | 
45 |
46 | ### 4. Create a table
47 |
48 | Navigate to `Data -> Create table` on the console and create a table called
49 | `profile` with the following columns:
50 |
51 | | name | type |
52 | |--------|--------------------------|
53 | | `id` | Integer (auto-increment) |
54 | | `name` | Text |
55 |
56 | Choose `id` as the Primary key and click the `Create` button.
57 |
58 | 
59 |
60 | ### 5. Insert sample data
61 |
62 | Once the table is created, go to the `Insert Row` tab and insert some sample
63 | rows:
64 | ```
65 | Thor
66 | Iron Man
67 | Hulk
68 | Captain America
69 | Black Widow
70 | ```
71 |
72 | 
73 |
74 | ### 6. Try out GraphQL
75 |
76 | Switch to the `GraphiQL` tab on top and execute the following GraphQL query:
77 |
78 | ```graphql
79 | query {
80 | profile {
81 | id
82 | name
83 | }
84 | }
85 | ```
86 |
87 | 
88 |
89 | ## Support & Troubleshooting
90 |
91 | Feel free to talk to us on [Discord](https://discord.gg/vBPpJkS) about anything
92 | and everything. You can also contact us using one of the following channels:
93 |
94 | * Support & feedback: [Discord](https://discord.gg/vBPpJkS)
95 | * Issue & bug tracking: [GitHub issues](https://github.com/hasura/graphql-engine/issues)
96 | * Follow product updates: [@HasuraHQ](https://twitter.com/hasurahq)
97 | * Talk to us on our [website chat](https://hasura.io).
98 |
99 | ## Next steps
100 |
101 | - [Using an existing Heroku database](https://docs.hasura.io/1.0/graphql/manual/deployment/heroku/using-existing-heroku-database.html)
102 | - [Securing your GraphQL Endpoint](https://hasura.io/docs/latest/graphql/core/deployment/securing-graphql-endpoint.html)
103 | - [Checking GraphQL Engine logs](https://docs.hasura.io/1.0/graphql/manual/deployment/heroku/logging.html)
104 | - [Updating to the latest version](https://docs.hasura.io/1.0/graphql/manual/deployment/heroku/updating.html)
105 |
106 | ## Further reading
107 |
108 | - [Building your schema](https://docs.hasura.io/1.0/graphql/manual/schema/index.html)
109 | - [GraphQL Queries](https://docs.hasura.io/1.0/graphql/manual/queries/index.html)
110 | - [GraphQL Mutations](https://docs.hasura.io/1.0/graphql/manual/mutations/index.html)
111 | - [GraphQL Subscriptions](https://docs.hasura.io/1.0/graphql/manual/subscriptions/index.html)
112 | - [Event Triggers](https://docs.hasura.io/1.0/graphql/manual/event-triggers/index.html)
113 | - [Authentication/Access control](https://docs.hasura.io/1.0/graphql/manual/auth/index.html)
114 | - [Database Migrations](https://docs.hasura.io/1.0/graphql/manual/migrations/index.html)
115 | - [Guides/Tutorials/Resources](https://docs.hasura.io/1.0/graphql/manual/guides/index.html)
116 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Hasura GraphQL Engine",
3 | "description": "Blazing fast, instant realtime GraphQL APIs on Postgres with fine grained access control and webhook triggers for async business logic.",
4 | "logo": "https://storage.googleapis.com/hasura-graphql-engine/console/assets/favicon.png",
5 | "keywords": [
6 | "database",
7 | "api",
8 | "graphql",
9 | "heroku",
10 | "postgres",
11 | "hasura"
12 | ],
13 | "success_url": "/console",
14 | "website": "https://hasura.io",
15 | "repository": "https://github.com/hasura/graphql-engine-heroku",
16 | "formation": {
17 | "web": {
18 | "quantity": 1
19 | }
20 | },
21 | "stack": "container",
22 | "addons": [
23 | {
24 | "plan": "heroku-postgresql:mini"
25 | }
26 | ]
27 | }
28 |
--------------------------------------------------------------------------------
/assets/console.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/console.png
--------------------------------------------------------------------------------
/assets/create_new_app_heroku.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/create_new_app_heroku.png
--------------------------------------------------------------------------------
/assets/create_new_app_heroku_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/create_new_app_heroku_2.png
--------------------------------------------------------------------------------
/assets/create_new_app_heroku_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/create_new_app_heroku_3.png
--------------------------------------------------------------------------------
/assets/hasura_console.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/hasura_console.png
--------------------------------------------------------------------------------
/assets/hasura_create_table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/hasura_create_table.png
--------------------------------------------------------------------------------
/assets/hasura_graphql_query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/hasura_graphql_query.png
--------------------------------------------------------------------------------
/assets/hasura_insert_row.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/hasura_insert_row.png
--------------------------------------------------------------------------------
/assets/heroku-create-new-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/heroku-create-new-app.png
--------------------------------------------------------------------------------
/assets/heroku_connect_db.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hasura/graphql-engine-heroku/980ec3f8cf28a4e6a2c8485d46546e83888f1723/assets/heroku_connect_db.png
--------------------------------------------------------------------------------
/heroku.yml:
--------------------------------------------------------------------------------
1 | build:
2 | docker:
3 | web: Dockerfile
4 |
--------------------------------------------------------------------------------