Skip to content

Commit 39a64e1

Browse files
committed
docs: fix sphinx problems and add autodoc
1 parent aa668d1 commit 39a64e1

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed

docs/api.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
API Reference
2-
====
2+
==============
33

4-
.. automodule::graphene_sqlalchemy
4+
SQLAlchemyObjectType
5+
--------------------
6+
.. autoclass:: graphene_sqlalchemy.SQLAlchemyObjectType
7+
8+
SQLAlchemyInterface
9+
-------------------
10+
.. autoclass:: graphene_sqlalchemy.SQLAlchemyInterface
11+
12+
ORMField
13+
--------------------
14+
.. autoclass:: graphene_sqlalchemy.fields.ORMField
15+
16+
SQLAlchemyConnectionField
17+
-------------------------
18+
.. autoclass:: graphene_sqlalchemy.SQLAlchemyConnectionField

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
# import os
2424
# import sys
2525
# sys.path.insert(0, os.path.abspath('.'))
26+
import os
27+
import sys
2628

29+
sys.path.insert(0, os.path.abspath(".."))
2730
# -- General configuration ------------------------------------------------
2831

2932
# If your documentation needs a minimal Sphinx version, state it here.
@@ -80,7 +83,7 @@
8083
#
8184
# This is also used if you do content translation via gettext catalogs.
8285
# Usually you set "language" from the command line for these cases.
83-
language = None
86+
language = "en"
8487

8588
# There are two options for replacing |today|: either, you set today to some
8689
# non-false value, then it is used:

docs/inheritance.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ class to the Schema constructor via the `types=` argument:
112112
See also: `Graphene Interfaces <https://docs.graphene-python.org/en/latest/types/interfaces/>`_
113113

114114
Eager Loading & Using with AsyncSession
115-
--------------------
115+
----------------------------------------
116116
When querying the base type in multi-table inheritance or joined table inheritance, you can only directly refer to polymorphic fields when they are loaded eagerly.
117117
This restricting is in place because AsyncSessions don't allow implicit async operations such as the loads of the joined tables.
118118
To load the polymorphic fields eagerly, you can use the `with_polymorphic` attribute of the mapper args in the base model:
119119

120120
.. code:: python
121+
121122
class Person(Base):
122123
id = Column(Integer(), primary_key=True)
123124
type = Column(String())

docs/relay.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Relay
2-
====
2+
==========
33

44
:code:`graphene-sqlalchemy` comes with pre-defined
55
connection fields to quickly create a functioning relay API.

docs/starter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Getting Started
2-
====
2+
=================
33

44
Welcome to the graphene-sqlalchemy documentation!
55
Graphene is a powerful Python library for building GraphQL APIs,
@@ -80,7 +80,7 @@ Then you can simply query the schema:
8080
8181
8282
It is important to provide a session for graphene-sqlalchemy to resolve the models.
83-
In this example, it is provided using the GraphQL context. See :ref:`querying` for
83+
In this example, it is provided using the GraphQL context. See :doc:`tips` for
8484
other ways to implement this.
8585

8686
You may also subclass SQLAlchemyObjectType by providing

0 commit comments

Comments
 (0)