No project description provided
Project description
🍓Strawberry Persisted Queries
Apollo-compatible persisted queries for Strawberry.
Usage
Add PersistedQueriesExtension
to your extensions.
import strawberry
from strawberry_persisted_queries import PersistedQueriesExtension
schema = strawberry.Schema(
query=Query,
extensions=[
PersistedQueriesExtension(),
],
)
Django
For Django, a Django cache backend is available.
from strawberry_persisted_queries.django_cache import DjangoPersistedQueryCache
PersistedQueriesExtension(cache_backend=DjangoPersistedQueryCache())
Safelisted Queries
DictSafelist
can be used to require persisted queries to already be saved.
This can be used with a build tool to ensure only queries used by your app are available.
from strawberry_persisted_queries.safelisting import DictSafelist
PersistedQueriesExtension(safelist=DictSafelist({
'sha256Hash': 'query {...}',
}))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for strawberry_persisted_queries-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60e394a3d7113d254f8737b7fa67e3f1669ecdb4498fedde4b8af7deb0272ef5 |
|
MD5 | 85075dcc0ef2afa020b4a36c06c966d3 |
|
BLAKE2b-256 | 473b37f6f9f6439b36a219e1ec03f1eeb371b3c08c838966fd82ff7c1615634e |
Close
Hashes for strawberry_persisted_queries-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75ea5a3680cd309664dabd02e459b69aa7a147f6d8dbbf2600e40b52c2c5d88b |
|
MD5 | e9c20397f9dc06ad03d78c6d6dd14baa |
|
BLAKE2b-256 | c9333597b452c122e3c37e9e75c32fa52f3e2c8d3f791d240a75d89dda65b76e |