-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve README and add docstrings (#21)
Separate between official and internal helper functions. Only the official functions are listed in __all__, and the internal ones are moved to the bottom of the file. Also, added a script to create docs from the docstrings. Add Python 3.6 and 3.7 as supported Python versions.
- Loading branch information
1 parent
cfe21f2
commit e0fcd01
Showing
12 changed files
with
279 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
*.pyc | ||
.idea | ||
.cache | ||
.tox | ||
*.pyo | ||
|
||
*.egg | ||
*.egg-info | ||
|
||
.cache | ||
.coverage | ||
/build/ | ||
.idea | ||
.mypy_cache | ||
.pytest_cache | ||
.tox | ||
.venv | ||
|
||
/build/ | ||
/dist/ | ||
/.mypy_cache | ||
/.pytest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
# GraphQL-Server | ||
# GraphQL-Server-Core | ||
|
||
[](https://travis-ci.org/graphql-python/graphql-server-core) [](https://coveralls.io/github/graphql-python/graphql-server-core?branch=master) [](https://badge.fury.io/py/graphql-server-core) | ||
|
||
GraphQL Server core package. | ||
GraphQL-Server-Core is a base library that serves as a helper | ||
for building GraphQL servers or integrations into existing web frameworks using | ||
[GraphQL-Core](https://github.com/graphql-python/graphql-core). | ||
|
||
## Integrations | ||
## Existing integrations built with GraphQL-Server-Core | ||
|
||
GraphQL Server powers the following integrations | ||
| Server integration | Package | | ||
|---|---| | ||
| Flask | [flask-graphql](https://github.com/graphql-python/flask-graphql/) | | ||
| Sanic |[sanic-graphql](https://github.com/graphql-python/sanic-graphql/) | | ||
| AIOHTTP | [aiohttp-graphql](https://github.com/graphql-python/aiohttp-graphql) | | ||
| WebOb (Pyramid, TurboGears) | [webob-graphql](https://github.com/graphql-python/webob-graphql/) | | ||
| WSGI | [wsgi-graphql](https://github.com/moritzmhmk/wsgi-graphql) | | ||
| Responder | [responder.ext.graphql](https://github.com/kennethreitz/responder/blob/master/responder/ext/graphql.py) | | ||
|
||
| Server integration | Package | | ||
|---------------|-------------------| | ||
| Django | [graphene-django](https://github.com/graphql-python/graphene-django/) | | ||
| Flask | [flask-graphql](https://github.com/graphql-python/flask-graphql/) | | ||
| Sanic | [sanic-graphql](https://github.com/graphql-python/sanic-graphql/) | | ||
| WebOb (Pyramid, Pylons) | [webob-graphql](https://github.com/graphql-python/webob-graphql/) | | ||
## Other integrations using GraphQL-Core or Graphene | ||
|
||
| Server integration | Package | | ||
|---|---| | ||
| Django | [graphene-django](https://github.com/graphql-python/graphene-django/) | | ||
|
||
## Documentation | ||
|
||
The `graphql_server` package provides these three public helper functions: | ||
|
||
* `run_http_query` | ||
* `encode_execution_results` | ||
* `laod_json_body` | ||
|
||
All functions in the package are annotated with type hints and docstrings, | ||
and you can build HTML documentation from these using `bin/build_docs`. | ||
|
||
You can also use one of the existing integrations listed above as | ||
blueprint to build your own integration or GraphQL server implementations. | ||
|
||
Please let us know when you have built something new, so we can list it here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# the documentation can be created from the docstrings | ||
# with pdoc (https://pdoc3.github.io/pdoc/) | ||
|
||
pdoc --html --overwrite --html-dir docs graphql_server |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# the README can be converted from MarkDown to reST | ||
# with pandoc (https://pandoc.org/) | ||
|
||
pandoc README.md --from markdown --to rst -s -o README.rst |
Oops, something went wrong.