mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-11 10:46:25 +03:00
docs update (#427)
This commit is contained in:
parent
a5930edd8a
commit
fffaed7bcb
@ -57,10 +57,11 @@ Examples of ``database-url``:
|
||||
serve --enable-console
|
||||
|
||||
|
||||
Check if everything is running well:
|
||||
Execute ``docker-run.sh`` & check if everything is running well:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ ./docker-run.sh
|
||||
$ docker ps
|
||||
|
||||
CONTAINER ID IMAGE ... CREATED STATUS PORTS ...
|
||||
|
@ -3,8 +3,10 @@ Getting started with an existing database
|
||||
|
||||
Follow one of these guides to setup Hasura GraphQL engine use an existing database:
|
||||
|
||||
- :doc:`Using Heroku <../deployment/heroku/using-existing-heroku-database>`: Run on Heroku using an existing Heroku
|
||||
Postgres database.
|
||||
- :doc:`Using Heroku <../deployment/heroku/using-existing-heroku-database>`: Run on Heroku and connect to an existing
|
||||
Heroku Postgres database.
|
||||
- :doc:`Using Docker <../deployment/docker/index>`: Run as a docker container and connect to an existing Postgres
|
||||
database.
|
||||
- :doc:`Using Kubernetes <../deployment/kubernetes/index>`: Run on Kubernetes and connect to an existing Postgres
|
||||
database.
|
||||
|
||||
|
@ -11,6 +11,9 @@ Relationships can be of two types:
|
||||
Each relationship has a name which is used to refer to the nested objects in queries. For example, "``articles``" of
|
||||
an ``author`` and "``author``" of an ``article``
|
||||
|
||||
Creating relationships
|
||||
----------------------
|
||||
|
||||
Typically relationships are defined using foreign-key constraints. But in some cases, it might not be possible to
|
||||
use foreign-key constraints to create the relation. For example, while trying to create a relationship involving a view
|
||||
as foreign-keys can't be created on views.
|
||||
@ -237,3 +240,11 @@ Here are examples to create relationships using the two methods:
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Renaming relationships
|
||||
----------------------
|
||||
|
||||
To rename a relationship, head to ``Data -> [table-name] -> Relationships`` in the console, drop the existing
|
||||
relationship and recreate it with the new name.
|
||||
|
||||
**Note:** You might not be allowed to drop a relationship if it has been referenced elsewhere (e.g. in a permissions rule)
|
@ -60,3 +60,6 @@ To track all the foreign-keys of all tables in the database:
|
||||
For example, for the foreign-key ``article::author_id -> author::id``, the relationship names will be
|
||||
``authorByAuthorId`` for ``article`` table and ``articlesByAuthorId`` for ``author`` table.
|
||||
|
||||
You can change the relationship names by heading to the ``Relationships`` tab of the concerned table/view and
|
||||
dropping and recreating the relationship with a name of your choice.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user