WebOb-GraphQL
Adds GraphQL support to your WebOb (Pyramid, Pylons, …) application.
Installation
For instaling WebOb-GraphQL, just run this command in your shell
pip install "webob-graphql>=1.0.dev"
Usage
Just use the serve_graphql_request function from webob_graphql
Pyramid
from pyramid.view import view_config
from webob_graphql import serve_graphql_request
@view_config(
route_name='graphql',
# The serve_graphql_request method will detect what's the best renderer
# to use, so it will do the json render automatically.
# In summary, don't use the renderer='json' here :)
)
def graphql_view(request):
return serve_graphql_request(request, schema)
# Optional, for adding batch query support (used in Apollo-Client)
return serve_graphql_request(request, schema, batch_enabled=True)
Supported options
schema: The GraphQLSchema object that you want the view to execute when it gets a valid request.
context: A value to pass as the context to the graphql() function.
root_value: The root_value you want to provide to executor.execute.
format_error: If you want to use a custom error formatter.
pretty: Whether or not you want the response to be pretty printed JSON.
executor: The Executor that you want to use to execute queries.
graphiql_enabled: If True (default), may present GraphiQL when loaded directly from a browser (a useful tool for debugging and exploration).
render_graphiql: A custom function for rendering GraphiQL (this function should have the arguments result and params).
batch_enabled: Enable batch support (for using in Apollo-Client or ReactRelayNetworkLayer)
Metadata
Release files for WebOb-GraphQL 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| WebOb-GraphQL-1.0.tar.gz | 7.3 kB | Without provenance | Details for WebOb-GraphQL-1.0.tar.gz |
Release files / WebOb-GraphQL-1.0.tar.gz
| Download URL | WebOb-GraphQL-1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e1f117bc923dd32862c61c7058dc2ba3104428d8e8713a1e27f0c4586378161
|
|
BLAKE2b-256 checksum How to use checksums |
a779e40d2c212e5c800716c182173ade1185cdb836dd60a3ab04e2316d8a9375
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for WebOb-GraphQL 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.