Skip to content

Commit

Permalink
docs update (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
rikinsk authored and shahidhk committed Sep 12, 2018
1 parent a5930ed commit fffaed7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/graphql/manual/deployment/docker/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 11 additions & 0 deletions docs/graphql/manual/schema/relationships/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions docs/graphql/manual/schema/using-existing-database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit fffaed7

Please sign in to comment.