Skip to content

Commit

Permalink
add rename_relationship metadata api docs (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvi3411301 authored and rikinsk committed Dec 17, 2019
1 parent deeae45 commit 756d8ab
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ The various types of queries are listed in the following table:
- 1
- Drop an existing relationship

* - :ref:`rename_relationship`
- :ref:`rename_relationship_args <rename_relationship_syntax>`
- 1
- Modify name of an existing relationship

* - :ref:`set_relationship_comment`
- :ref:`set_relationship_comment_args <set_relationship_comment_syntax>`
- 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,52 @@ Args syntax
- false
- Text
- Comment

.. _rename_relationship:

rename_relationship
-------------------

``rename_relationship`` is used to modify the name of an existing relationship.

An example:

.. code-block:: http
POST /v1/query HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type": "rename_relationship",
"args": {
"table": "article",
"name": "article_details",
"new_name": "article_detail"
}
}
.. _rename_relationship_syntax:

Args syntax
^^^^^^^^^^^

.. list-table::
:header-rows: 1

* - Key
- Required
- Schema
- Description
* - table
- true
- :ref:`TableName`
- Name of the table
* - name
- true
- :ref:`RelationshipName`
- The relationship
* - new_name
- true
- :ref:`RelationshipName`
- New relationship name

0 comments on commit 756d8ab

Please sign in to comment.