Skip to content

Commit

Permalink
start adding docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido committed Mar 24, 2021
1 parent fd69ee9 commit f9702d9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc", "sphinx_rtd_theme"]
extensions = ["sphinx.ext.autodoc", "sphinx_rtd_theme", "sphinx.ext.intersphinx", "sphinx.ext.napoleon"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down Expand Up @@ -62,3 +62,7 @@
html_static_path = ["_static"]

html_show_sphinx = False

# -- Intersphinx ---------------------

intersphinx_mapping = {'graphql': ('https://graphql-core-3.readthedocs.io/en/stable', None)}
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ GraphQL + SQLAlchemy <3
:caption: Reference

reference/query
reference/api
7 changes: 7 additions & 0 deletions docs/source/reference/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
API Reference
=============

.. automodule:: graphql_sqlalchemy
:members:

.. autofunction:: graphql_sqlalchemy.build_schema
9 changes: 9 additions & 0 deletions src/graphql_sqlalchemy/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ def build_mutations(model: DeclarativeMeta, objects: Objects, mutations: GraphQL


def build_schema(base: DeclarativeMeta, enable_subscription: bool = False) -> GraphQLSchema:
"""
Args:
base:
enable_subscription:
Returns: :class:`graphql:graphql.type.GraphQLSchema`
"""
queries: GraphQLFieldMap = {}
mutations: GraphQLFieldMap = {}

Expand Down

0 comments on commit f9702d9

Please sign in to comment.