Changes in 0.8¶
0.8.0rcXX¶
0.8.0rc24¶
Fix typing for federation
FieldSetdirectives soKey(...),Provides(...), andRequires(...)accept plain strings in type-checked code while preserving_FieldSetschema metadata.Validate transitive
@requiresonFederatedNodelinks at graph construction time. If aLinkdeclaresrequires=["a", "b"]and fieldbhas@requires(fields="c"), theLink’s SDL@requiresdirective must also includec. AValueErroris now raised atGraph()construction time with a suggested fix, making this class of federation bug impossible to deploy undetected.Fix query exporter to collect and export fragment definitions so exported queries remain valid when fragments are referenced indirectly.
Normalize fragment types in query merger and init options to avoid fragment type mismatches when merging queries that use abstract fragments.
Optimize
InitOptionscopying during engine setup to reduce initialization overhead.
0.8.0rc22¶
Replace AssertionError with GraphQLError for invalid inputs
0.8.0rc21¶
Fix prometheus metrics wrapper key which caused metrics to be lost in some cases
0.8.0rc20¶
[Graphql Spec 2025] Add support for
@deprecateddirective onhiku.graph.Option[Graphql Spec 2025] Add isDeprecated and deprecationReason fields to introspection for
hiku.graph.Option
0.8.0rc18¶
Drop support for python3.9.
0.8.0rc17¶
Support python3.14 in expr/compiler.
Add python3.13 and python3.14 to testing matrix/tox
0.8.0rc16¶
Fix dataclasses.Field
docparam support for py3.14
0.8.0rc15¶
Move QueryMerger after validation step in order to catch invalid queries with non-existing links before query merging since QueryMerger will raise KeyError in that case.
0.8.0rc14¶
Fix some broken type annotations
0.8.0rc13¶
Fix using python
EnumasOption.defaultvalue. SDL exporing was broken
0.8.0rc12¶
Fix
Optional[InputRef]value validation if None provided or argument not provided in query at all.
0.8.0rc11¶
Fix Input Object default value serialization in introspection
0.8.0rc10¶
Introduce
InputObjecttypes support (https://graphql.org/learn/schema/#input-object-types) viahiku.graph.Inputandhiku.types.InputRefInputis intended to supersed input objects generated fromdata_typesRecords (the one’s withIOprefix). More on that in Inputs docs.from hiku.graph import Input from hiku.types import InputRef Graph([ Node("User", [ Field("id", Integer), Field("avatar", String, options=[ Option("params", InputRef["ImageParams"]) ]) ]), Root([ Field("user", TypeRef["User"]), ]), ], inputs=[ Input("ImageParams", [ Option("width", Integer), Option("height", Optional[Integer], default=None) ]) ], )
0.8.0rc9¶
#181 Fix float input parsing when value is int
0.8.0rcX¶
Introduce
Schema. This is a new high-level api with aim to provide single entrypoint for validation/execution and query/mutations. Previously we had to manage two serapate graphs - one for Query other for Mutation or use endpoint api butendpointapi is more like an integration-like api for http handlers. More on that in Schema docs.SchemareturnsExecutionResultdataclass withdata,errorsandresultfields.dataalready denormalized but access to Proxy object atresultfield is retained.Endpointnow is much simpler under the hood and it basically delegates execution to schema, only providing support for batching.Drop custom
validatefunction for federation since we now have better support for_entitiesand_servicefields and their corresponding types.Add new
Mquery builder that indicates that this is amutation. It must be used to build amutationquery that will be passed toSchema.executemethod which will then infer that this is a mutation query Node.Drop
hiku.federation.validate.validateDrop
hiku.federation.denormalizeDrop
hiku.federation.engineDrop
hiku.federation.endpoint- usehiku.endpointinsteadChange
QueryDepthValidatorhook toon_validateChange
GraphQLResponsetype used by endpoint - it now has bothdataanderrorsfieldsRename
on_dispatchhook toon_operationRemove
executemethod fromBaseGraphQLEndpointclassAdd
process_resultmethod toBaseGraphQLEndpointclass - it returnsGraphQLResponseobject with{"data": ...}or{"data": null, "errors": [...]is case ther are errors.Move
GraphQLErrortohiku.errormoduleDrop
GraphQLError.errorsfield. Earlier we used to store multiple errors in singleGraphQLErrorbut now its one message - oneGraphQLError.Add
GraphQLError.messagefieldDropped support for
Python 3.7, which ended support on 2023-06-27Dropped support for
Python 3.8, which ended support on 2024-10-07Fix: now it is possible to alias record field
Update pdm and migrate from pep528 to venv
Use
uvfor faster package installationAdd support for multiple types in
representationsin_entitiesfederation fieldGraph([Root([Field("user", TypeRef["User"]))], data_types={"User": Record[{"id": Integer, "name": String}]})
query { user { id my_name: name } }
Drop
loopparameter fromhiku.executors.asyncio.AsyncIOExecutorconstructor.
Backward-incompatible changes¶
Drop hiku.federation.endpoint.enormalize_entities
Drop hiku.federation.validate.validate
Drop hiku.federation.endpoint - use hiku.endpoint instead
Drop hiku.federation.denormalize
Drop hiku.federation.engine - use hiku.engine instead
Remove execute method from BaseGraphQLEndpoint class
Move GraphQLError to hiku.error module
Drop GraphQLError.errors field
Add GraphQLError.message field
Dropped support for Python 3.7, which ended support on 2023-06-27
Dropped support for Python 3.8, which ended support on 2024-10-07