Official MACSS outbound GraphQL client for Python.
Project description
macss-modular-api-graphql-client
Official MACSS outbound GraphQL client for Python.
Quick start
from modular_api_graphql_client import GraphqlRequest, ServiceClientConfig, graphql_client
result = graphql_client(
config=ServiceClientConfig(
service_id="users-graphql",
base_url="https://api.example.test",
redacted_summary="users-graphql@example",
default_headers={"accept": "application/json"},
),
request=GraphqlRequest(
operation_id="users.query",
document="query GetUsers { users { id } }",
operation_name="GetUsers",
),
decoder=lambda value: dict(value or {}),
)
if result.is_success:
print(result.value.data)
print(result.value.errors)
else:
print(result.failure.message)
Current slice
- query-only GraphQL POST requests to
/graphql - normalized
GraphqlResponse[T]withdata,errors,extensions, and metadata - persistent
GraphqlClient - one-shot
graphql_client()helper - transport failures kept separate from GraphQL error envelopes
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macss_modular_api_graphql_client-0.4.7.tar.gz.
File metadata
- Download URL: macss_modular_api_graphql_client-0.4.7.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5830059d2d017ba5137432f332438d20f162b08f520ead13767d15bcb71e2f23
|
|
| MD5 |
ee9caf769d5ef7dfbafa0562053dd786
|
|
| BLAKE2b-256 |
2416cff746551000f8594600cd6da7d6918e88a827767b4b5983e4e12858a906
|
File details
Details for the file macss_modular_api_graphql_client-0.4.7-py3-none-any.whl.
File metadata
- Download URL: macss_modular_api_graphql_client-0.4.7-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d8103da4641a6129a37ecb18f4093b8afc02b177abe41376ae336560f19582
|
|
| MD5 |
fe936a1068acabfb3e38e3970bbeef70
|
|
| BLAKE2b-256 |
2c2a18664e1b592859b05756d9232c13bb6f5a8989987a162b1519e021d23c7b
|