diff --git a/docs/general-usage/graphql-types.rst b/docs/general-usage/graphql-types.rst index e4de79f0..65057e16 100644 --- a/docs/general-usage/graphql-types.rst +++ b/docs/general-usage/graphql-types.rst @@ -44,7 +44,7 @@ the name of the model: .. code-block:: graphql - { + query { pages { ...on BlogPage { the_custom_field @@ -96,7 +96,7 @@ the root query type like so: .. code-block:: graphql - { + query { images { src } @@ -146,7 +146,7 @@ the root query type like so: ``ImageRenditionObjectType`` describes a Wagtail image rendition and provides the following fields: -:: +.. code-block:: graphql id: ID! filter_spec = String! @@ -169,7 +169,7 @@ or by a StreamField block. The following fields are returned: -:: +.. code-block:: graphql id: ID title: String @@ -195,7 +195,7 @@ An example of querying all snippets: .. code-block:: graphql - { + query { snippets { ...on Advert { id @@ -229,7 +229,7 @@ You can also query a setting by model name: .. code-block:: graphql - { + query { setting(name: "SocialMediaSettings") { ...on SocialMediaSettings { facebook @@ -263,7 +263,7 @@ The plural ``sites`` field can be queried like so: .. code-block:: graphql - { + query { sites { port hostname @@ -282,7 +282,7 @@ and can be queried like so: .. code-block:: graphql - { + query { site(hostname: "my.domain") { pages { title @@ -298,7 +298,7 @@ You can also simply search all models via GraphQL like so: .. code-block:: graphql - { + query { search(query:"blog") { ...on BlogPage { title diff --git a/docs/general-usage/index.rst b/docs/general-usage/index.rst index 915178e9..a23dadd7 100644 --- a/docs/general-usage/index.rst +++ b/docs/general-usage/index.rst @@ -4,9 +4,8 @@ General Usage .. toctree:: :maxdepth: 1 - settings - model-types graphql-types + model-types decorators hooks middleware diff --git a/docs/getting-started/examples.rst b/docs/getting-started/examples.rst index ed8dd953..3522ddd3 100644 --- a/docs/getting-started/examples.rst +++ b/docs/getting-started/examples.rst @@ -51,7 +51,7 @@ Wagtail docs: The following field can then be queries at http://localhost:8000/graphql using something like: -:: +.. code-block:: graphql { pages { @@ -75,5 +75,6 @@ something like: **Next Steps** + * :doc:`settings` * :doc:`../general-usage/graphql-types` * :doc:`../general-usage/preview` diff --git a/docs/getting-started/index.rst b/docs/getting-started/index.rst index 9a150ff5..cc8d5881 100644 --- a/docs/getting-started/index.rst +++ b/docs/getting-started/index.rst @@ -6,3 +6,4 @@ Getting Started installation examples + settings diff --git a/docs/getting-started/installation.rst b/docs/getting-started/installation.rst index d35583d5..3590dd39 100644 --- a/docs/getting-started/installation.rst +++ b/docs/getting-started/installation.rst @@ -49,11 +49,12 @@ Add the GraphQL URLs to your ``urls.py``: Done! Now you can proceed onto configuring your models to generate GraphQL types that adopt their structure. -By default, Grapple uses :doc:`these settings <../general-usage/settings>`. +By default, Grapple uses :doc:`these settings `. * **Next Steps** * :doc:`examples` + * :doc:`settings` * :doc:`../general-usage/graphql-types` diff --git a/docs/general-usage/settings.rst b/docs/getting-started/settings.rst similarity index 99% rename from docs/general-usage/settings.rst rename to docs/getting-started/settings.rst index 603729d1..8d3d0aad 100644 --- a/docs/general-usage/settings.rst +++ b/docs/getting-started/settings.rst @@ -101,7 +101,7 @@ Rich text settings ^^^^^^^^^^^^^^^^^^ ``RICHTEXT_FORMAT`` -***************** +******************* Controls the ``RichText`` field and the ``RichTextBlock`` StreamField block output. Read more about the Wagtail rich text data format in the Wagtail docs (`Rich text internals `_). @@ -126,7 +126,7 @@ Pagination settings ^^^^^^^^^^^^^^^^^^^ ``PAGE_SIZE`` -************ +************** Used as default for both the ``limit`` argument for ``QuerySetList`` and the ``perPage`` argument for ``PaginatedQuerySet``.