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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a900dbfa28ff2bf3b99ae6f321f1a33f23d7cbed3ada75e2657efe09898d4fe5 |
|
MD5 | 27ccce7e901c50af47e058350cf4acc8 |
|
BLAKE2b-256 | 4ef550a0fd08a9dd56ae5cdefe3245ca968e7e247f7ca676a7e30962c116e71d |
Close
Hashes for strawberry_persisted_queries-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | beb474fae39a8af495f314942233dd5ca22aee0211735526f184f08893142b9c |
|
MD5 | fd6a0b1142a2ef57efa685752c9dbcd1 |
|
BLAKE2b-256 | 703e81b0acb87f93af6cea139457ae97d293cd99813403e8d9e31c1a0e812079 |