From bdb3aa23354aebd9de6befcf6b9adffb815a4411 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Mon, 24 Feb 2025 17:12:13 +0000 Subject: [PATCH] Fix links/refs in js docs --- docs/clients/js/queries.rst | 8 +++----- docs/clients/js/select.rst | 2 +- docs/edgeql/parameters.rst | 2 ++ docs/edgeql/with.rst | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/clients/js/queries.rst b/docs/clients/js/queries.rst index b0a0bdaf905..ca0781c4f4a 100644 --- a/docs/clients/js/queries.rst +++ b/docs/clients/js/queries.rst @@ -271,11 +271,9 @@ To exclude the generated files, add the following lines to your ``.gitignore`` f Writing Queries with Parameters ------------------------------- -To inject external values into your EdgeQL queries, you can use `parameters `__. +To inject external values into your EdgeQL queries, you can use :ref:`parameters `. When using the queries generator, you may be tempted to declare the same parameter in multiple places. -However, it's better practice to declare it once by assigning it to a variable in a `with block `__ +However, it's better practice to declare it once by assigning it to a variable in a :ref:`with block ` and reference that variable in the rest of your query. This way you avoid mismatched types in your declarations, -such as forgetting to mark them all as `optional `__. - -Check out the `EdgeQL docs `__ to learn more about writing queries. +such as forgetting to mark them all as :ref:`optional `. diff --git a/docs/clients/js/select.rst b/docs/clients/js/select.rst index 781d08d2061..766f240c492 100644 --- a/docs/clients/js/select.rst +++ b/docs/clients/js/select.rst @@ -638,7 +638,7 @@ fact that they will only occur in certain objects. Detached -------- -Sometimes you need to "detach" a set reference from the current scope. (Read the `reference docs `_ for details.) You can achieve this in the query builder with the top-level ``e.detached`` function. +Sometimes you need to "detach" a set reference from the current scope. (Read the :ref:`reference docs ` for details.) You can achieve this in the query builder with the top-level ``e.detached`` function. .. code-block:: typescript diff --git a/docs/edgeql/parameters.rst b/docs/edgeql/parameters.rst index c01ddd0f568..dc7cc965146 100644 --- a/docs/edgeql/parameters.rst +++ b/docs/edgeql/parameters.rst @@ -125,6 +125,8 @@ properties. }; +.. _ref_eql_params_optional: + Optional parameters ------------------- diff --git a/docs/edgeql/with.rst b/docs/edgeql/with.rst index e67d7867f56..4bdda063b3d 100644 --- a/docs/edgeql/with.rst +++ b/docs/edgeql/with.rst @@ -60,6 +60,7 @@ Avengers. ... } +.. _ref_eql_with_params: Query parameters ^^^^^^^^^^^^^^^^