- Changed code typing to satisfy MyPy 1.11.0 version
- Added support for
async_client=false
to work withenable_custom_operations=true
- Fix propagating
convert_to_snake_case
to clients during package generation
- Added
ClientForwardRefsPlugin
to standard plugins. - Re-added
model_rebuild
calls for input types with forward references. - Fixed fragments on interfaces being omitted from generated client.
- Fixed
@Include
directive result type when usingconvert_to_snake_case
option. - Added Custom query builder feature.
- Fixed
str_to_snake_case
utility to capture fully capitalized words followed by an underscore. - Re-added
model_rebuild
calls for models with forward references. - Fixed potential name conflicts between field args and generated client's method code.
- Fixed
graphql-transport-ws
protocol implementation not waiting for theconnection_ack
message on new connection. - Fixed
get_client_settings
mutatingconfig_dict
instance. - Added support to
graphqlschema
for saving schema as a GraphQL file. - Restored
model_rebuild
calls for top level fragment models.
- Removed
model_rebuild
calls for generated input, fragment and result models. - Added
NoReimportsPlugin
that makes the__init__.py
of generated client package empty. - Added
include_all_inputs
config flag to generate only inputs used in supplied operations. - Added
include_all_enums
config flag to generate only enums used in supplied operations. - Added
operationName
to payload sent by generated client's methods. - Fixed base clients to pass
mypy --strict
without installed optional dependencies. - Renamed
GraphQlClientInvalidResponseError
toGraphQLClientInvalidResponseError
(breaking change). - Changed base clients to raise
GraphQLClientGraphQLMultiError
for payloads witherrors
key but nodata
(breaking change).
- Fixed generating results for nullable fields with nullable directives.
- Changed
include_comments
option to accept enum value, changed default to"stable"
, deprecated boolean support. Addedget_file_comment
plugin hook. - Changed
str_to_snake_case
utility to correctly handle capitalized words. - Digits in Python names are now preceded by an underscore (breaking change).
- Fixed parsing of unions and interfaces to always add
__typename
to generated result models. - Added escaping of enum values which are Python keywords by appending
_
to them. - Fixed
enums_module_name
option not being passed to generators. - Added additional base clients supporting the Open Telemetry tracing. Added
opentelemetry_client
config option. - Changed generated client's methods to pass
**kwargs
to base client'sexecute
andexecute_ws
methods (breaking change for custom base clients). - Added
operation_definition
argument togenerate_client_method
plugin hook. - Added
ExtractOperationsPlugin
that extracts operation strings from client methods to separate module. - Added Python 3.12 to tested versions.
- Fixed generating operation string for nested inline fragments.
- Removed scalars module. Changed generated models and client to use annotated types for custom scalars. Removed
scalars_module_name
option. Removedgenerate_scalars_module
,generate_scalars_cod
,generate_scalar_annotation
andgenerate_scalar_imports
plugin hooks. - Removed pydantic warnings for fields with
model_
prefix. - Fixed generating result types with nullable directives.
- Added support for
Upload
scalar. Added support for file uploads toAsyncBaseClient
andBaseClient
. - Added validation of defined operations against the schema.
- Removed
mixin
directive from fragment string included in operation string sent to server. - Added support for
mixin
directive on fragments definitions. - Added support for fragments defined on subtype of field's type.
- Added default representation for a field name consisting only of underscores.
- Changed generated client and models to use pydantic v2.
- Changed custom scalars implementation to utilize pydantic's
BeforeValidator
andPlainSerializer
. Addedscalars_module_name
option. Replacedgenerate_scalars_parse_dict
andgenerate_scalars_serialize_dict
withgenerate_scalar_annotation
andgenerate_scalar_imports
plugin hooks. - Unified annotations in generated client to be compatible with python < 3.9.
- Fixed generating default values of input types from remote schemas.
- Changed generating of input and result field names to add
_
to names reserved by pydantic.
- Fixed
AsyncBaseClient
andBaseClient
to sendContent-Type
header with requests.
- Added support for subscriptions as async generators.
- Changed how fragments are handled to generate separate module with fragments as mixins.
- Fixed
ResultTypesGenerator
to triggergenerate_result_class
for each result model. - Changed processing of models fields to trim leading underscores.
- Added
ShorterResultsPlugin
to standard plugins. - Fixed handling of inline fragments inside other fragments.
- Changed generated unions to use pydantic's discriminated unions feature.
- Replaced HTTPX's
json=
serializer for query payloads with pydantic'spydantic_encoder
. - Removed
mixin
directive from operation string sent to server. - Fixed
ShorterResultsPlugin
that generated faulty code for discriminated unions. - Changed generator to ignore unused fragments which should be unpacked in queries.
- Changed type hints for parse and serialize methods of scalars to
typing.Any
. - Added
process_schema
plugin hook.
- Changed logic how custom scalar imports are generated. Deprecated
import_
key. - Added escaping of GraphQL names which are Python keywords by appending
_
to them. - Fixed parsing of list variables.
- Changed base clients to remove unset arguments and input fields from variables payload.
- Added
process_name
plugin hook.
- Added generation of GraphQL schema's Python representation.
- Fixed annotations for lists.
- Fixed support of custom operation types names.
- Unlocked versions of black, isort, autoflake and dev dependencies
- Added
remote_schema_verify_ssl
option. - Changed how default values for inputs are generated to handle potential cycles.
- Fixed
BaseModel
incorrectly callingparse
andserialize
methods on entire list instead of its items forList[Scalar]
.
- Fixed generating models from interfaces with inline fragments.
- Added default
None
values for generated methods optional arguments. - Added basic plugin system.
- Added
InitFileGenerator
,EnumsGenerator
,ClientGenerator
andArgumentsGenerator
plugin hooks. - Added
InputTypesGenerator
andResultTypesGenerator
plugin hooks. - Added
ScalarsDefinitionsGenerator
andPackageGenerator
plugin hooks. - Added support for
[tool.ariadne-codegen]
section key. Deprecated[ariadne-codegen]
. - Added support for environment variables to remote schema headers values.
- Added
--config
argument toariadne-codegen
script, to support reading configuration from custom path.
- Changed generated code to pass
mypy --strict
. - Changed base clients to get full url from user.
- Added support for custom scalars.
- Fixed incorrectly raised exception when using custom scalar as query argument type.
- Added
remote_schema_url
andremote_schema_headers
settings to support reading remote schemas. - Added
headers
argument to__init__
methods ofBaseClient
andAsyncBaseClient
.