No project description provided
Project description
Ariadne Codegen Field Fix Plugin
This plugin aims to fix a really annoying issue with ariadne-codegen, where the original fieldname (from the provided graphql schema) isn't used when creating custom field calls. This disparity causes queries to break if the graphql API cannot handle snake-case, but you want generated field names to use snake-case.
Installation
All you have to do to install the plugin is run
pip install ariadne-codegen-field-fix
Then just add the plugin to your ariadne config.
Usage
To use this plugin simply add "ariadne_codegen_field_fix" to your plugins list.
Example
[tool.ariadne-codegen]
schema_path = "schema.graphql"
enable_custom_operations = true
convert_to_snake_case = true
plugins = ["ariadne_codegen_field_fix"]
Under the hood
Under the hood the actual ariadne-codegen plugin class does nothing (due to poor hook support), the real magic happens when the plugin module gets loaded and the client_generators.custom_fields.CustomFieldsGenerator class gets monkey patched (via client_generators.package.CustomFieldsGenerator).
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 ariadne_codegen_field_fix-0.1.0.tar.gz.
File metadata
- Download URL: ariadne_codegen_field_fix-0.1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a51b34f4b54f245e43a16d3f85195ae21a947eaf66e0ebb75270e02c824990bd
|
|
| MD5 |
a453e342ae8b87020bae71bacc813c9c
|
|
| BLAKE2b-256 |
f352ffe5fd28e846ddaed6e0790f6846d00a5383f5599e9d19a1555bfface730
|
Provenance
The following attestation bundles were made for ariadne_codegen_field_fix-0.1.0.tar.gz:
Publisher:
build-and-publish.yaml on ewen-lorimer/ariadne-codegen-field-fix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ariadne_codegen_field_fix-0.1.0.tar.gz -
Subject digest:
a51b34f4b54f245e43a16d3f85195ae21a947eaf66e0ebb75270e02c824990bd - Sigstore transparency entry: 469693873
- Sigstore integration time:
-
Permalink:
ewen-lorimer/ariadne-codegen-field-fix@a4fb34c84e657ba49ddc8a8e2abdfe851001e0ac -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ewen-lorimer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yaml@a4fb34c84e657ba49ddc8a8e2abdfe851001e0ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file ariadne_codegen_field_fix-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ariadne_codegen_field_fix-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9304213d105519d572760844643948cf5193c14f842d7f8464901a3ba2b0e7f
|
|
| MD5 |
35c20b10ccc7e74c28eae140ec7f37a2
|
|
| BLAKE2b-256 |
523f53525f72deae07539b8c14a3b30d7130d33b0e5ffdc2661e903ba1f83523
|
Provenance
The following attestation bundles were made for ariadne_codegen_field_fix-0.1.0-py3-none-any.whl:
Publisher:
build-and-publish.yaml on ewen-lorimer/ariadne-codegen-field-fix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ariadne_codegen_field_fix-0.1.0-py3-none-any.whl -
Subject digest:
b9304213d105519d572760844643948cf5193c14f842d7f8464901a3ba2b0e7f - Sigstore transparency entry: 469693885
- Sigstore integration time:
-
Permalink:
ewen-lorimer/ariadne-codegen-field-fix@a4fb34c84e657ba49ddc8a8e2abdfe851001e0ac -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ewen-lorimer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yaml@a4fb34c84e657ba49ddc8a8e2abdfe851001e0ac -
Trigger Event:
push
-
Statement type: