这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/graphql/manual/api-reference/mutation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,6 @@ E.g.:

where: BoolExp_

.. _BoolExp:

BoolExp
*******

Expand Down
153 changes: 134 additions & 19 deletions docs/graphql/manual/api-reference/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ Query/Subscription syntax
Syntax definitions
------------------

.. _Object:

Object
^^^^^^

Simple Object :-
****************

.. code-block:: none

object-name {
Expand All @@ -76,6 +77,7 @@ Object
..
nested object1
nested object2
aggregate nested object1
..
}

Expand All @@ -84,14 +86,139 @@ E.g.
.. code-block:: graphql

author {
id # scalar field
name # scalar field
article { # nested object
id # scalar field
name # scalar field
article { # nested object
title
}
article_aggregate { # aggregate nested object
aggregate {
count
}
nodes {
title
}
}
}

.. _Argument:
Aggregate Object :-
*******************

.. code-block:: none

object-name_aggregate {
aggregate {
count
sum {
field
..
}
avg {
field
..
}
stddev {
field
..
}
stddev_samp {
field
..
}
stddev_pop {
field
..
}
variance {
field
..
}
var_samp {
field
..
}
var_pop {
field
..
}
max {
field
..
}
min {
field
..
}
nodes {
field1
field2
..
nested object1
nested object2
aggregate nested object1
..
}
}

(For more details on aggregate functions, refer to `Postgres docs <https://www.postgresql.org/docs/current/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE>`__.)

E.g.

.. code-block:: graphql

author_aggregate {
aggregate {
count # total count
sum {
id # sum aggregate on id
}
avg {
id # avg aggregate on id
}
stddev {
id # stddev aggregate on id
}
stddev_samp {
id # stddev_samp aggregate on id
}
stddev_pop {
id # stddev_pop aggregate on id
}
variance {
id # variance aggregate on id
}
var_samp {
id # var_samp aggregate on id
}
var_pop {
id # var_pop aggregate on id
}
max {
id # max aggregate on id
}
min {
id # min aggregate on id
}
}

nodes { # objects
id # scalar field
name # scalar field

article { # nested object
title
}

article_aggregate{ # aggregate nested object
aggregate {
count
}
nodes {
title
}
}
}
}

Argument
^^^^^^^^
Expand All @@ -109,17 +236,13 @@ WhereExp

where: BoolExp_

.. _BoolExp:

BoolExp
"""""""

.. parsed-literal::

AndExp_ | OrExp_ | NotExp_ | ColumnExp_

.. _AndExp:

AndExp
######

Expand All @@ -129,8 +252,6 @@ AndExp
_and: [BoolExp_]
}

.. _OrExp:

OrExp
#####

Expand All @@ -140,8 +261,6 @@ OrExp
_or: [BoolExp_]
}

.. _NotExp:

NotExp
######

Expand Down Expand Up @@ -193,7 +312,7 @@ JSONB operators:
* - ``_has_keys_all``
- ``?&``

(For more details on what these operators do, refer to `Postgres docs <https://www.postgresql.org/docs/current/static/functions-json.html#FUNCTIONS-JSONB-OP-TABLE>`_.)
(For more details on what these operators do, refer to `Postgres docs <https://www.postgresql.org/docs/current/static/functions-json.html#FUNCTIONS-JSONB-OP-TABLE>`__.)

Text related operators :

Expand Down Expand Up @@ -231,8 +350,6 @@ or
order_by: [{id: desc}, {author: {id: asc}}]


.. _TableOrderBy:

TableOrderBy
************

Expand Down Expand Up @@ -262,8 +379,6 @@ Order by type for "article" table:
author: author_order_by
}

.. _OrderByEnum:

OrderByEnum
***********

Expand Down
4 changes: 0 additions & 4 deletions docs/graphql/manual/event-triggers/payload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ JSON payload
Syntax definitions
------------------

.. _Object:

Object
^^^^^^

Expand All @@ -129,8 +127,6 @@ Object
}


.. _OpName:

OpName
^^^^^^

Expand Down
Loading