Skip to content

Commit

Permalink
Move the settings docs to the getting started section
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolab committed Sep 11, 2023
1 parent 75cbefd commit e2fc4f1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
18 changes: 9 additions & 9 deletions docs/general-usage/graphql-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ the name of the model:

.. code-block:: graphql
{
query {
pages {
...on BlogPage {
the_custom_field
Expand Down Expand Up @@ -96,7 +96,7 @@ the root query type like so:

.. code-block:: graphql
{
query {
images {
src
}
Expand Down Expand Up @@ -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!
Expand All @@ -169,7 +169,7 @@ or by a StreamField block.

The following fields are returned:

::
.. code-block:: graphql
id: ID
title: String
Expand All @@ -195,7 +195,7 @@ An example of querying all snippets:

.. code-block:: graphql
{
query {
snippets {
...on Advert {
id
Expand Down Expand Up @@ -229,7 +229,7 @@ You can also query a setting by model name:

.. code-block:: graphql
{
query {
setting(name: "SocialMediaSettings") {
...on SocialMediaSettings {
facebook
Expand Down Expand Up @@ -263,7 +263,7 @@ The plural ``sites`` field can be queried like so:

.. code-block:: graphql
{
query {
sites {
port
hostname
Expand All @@ -282,7 +282,7 @@ and can be queried like so:

.. code-block:: graphql
{
query {
site(hostname: "my.domain") {
pages {
title
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions docs/general-usage/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ General Usage
.. toctree::
:maxdepth: 1

settings
model-types
graphql-types
model-types
decorators
hooks
middleware
Expand Down
3 changes: 2 additions & 1 deletion docs/getting-started/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -75,5 +75,6 @@ something like:
**Next Steps**

* :doc:`settings`
* :doc:`../general-usage/graphql-types`
* :doc:`../general-usage/preview`
1 change: 1 addition & 0 deletions docs/getting-started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Getting Started

installation
examples
settings
3 changes: 2 additions & 1 deletion docs/getting-started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <settings>`.

* **Next Steps**

* :doc:`examples`
* :doc:`settings`
* :doc:`../general-usage/graphql-types`


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://docs.wagtail.io/en/stable/extending/rich_text_internals.html#data-format>`_).
Expand All @@ -126,7 +126,7 @@ Pagination settings
^^^^^^^^^^^^^^^^^^^

``PAGE_SIZE``
************
**************

Used as default for both the ``limit`` argument for ``QuerySetList`` and the ``perPage`` argument for ``PaginatedQuerySet``.

Expand Down

0 comments on commit e2fc4f1

Please sign in to comment.