diff --git a/docs/graphql/manual/deployment/docker/index.rst b/docs/graphql/manual/deployment/docker/index.rst index 6778b898fa3..aa9ebecc62b 100644 --- a/docs/graphql/manual/deployment/docker/index.rst +++ b/docs/graphql/manual/deployment/docker/index.rst @@ -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 ... diff --git a/docs/graphql/manual/getting-started/using-existing-database.rst b/docs/graphql/manual/getting-started/using-existing-database.rst index 228bac3fe00..b4f9fa7a0fb 100644 --- a/docs/graphql/manual/getting-started/using-existing-database.rst +++ b/docs/graphql/manual/getting-started/using-existing-database.rst @@ -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. diff --git a/docs/graphql/manual/schema/relationships/index.rst b/docs/graphql/manual/schema/relationships/index.rst index 504a4faf98a..16c558edb9c 100644 --- a/docs/graphql/manual/schema/relationships/index.rst +++ b/docs/graphql/manual/schema/relationships/index.rst @@ -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) \ No newline at end of file diff --git a/docs/graphql/manual/schema/using-existing-database.rst b/docs/graphql/manual/schema/using-existing-database.rst index 1c64580c20a..a1945e0d66e 100644 --- a/docs/graphql/manual/schema/using-existing-database.rst +++ b/docs/graphql/manual/schema/using-existing-database.rst @@ -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. +