NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4830 most downloaded on crates.io
A code first GraphQL client for Rust
Last release 2 months ago
12 Jul 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
77 releases · first in 2020
One column per quarter.
StreamingOperation now exposes its query, variables & operation_name
Thanks to the people who contributed to this release:
Fixed a possible panic when reading schemas or queries with short block strings.
QueryVariables derive will not show errors from missing_docs lint
The old intrerface to cynic_querygen has been marked deprecated
InputObject on a oneOf type will automatically skip serializing all ofInputObject can now be derived on enums for oneOf inputs (#1174)Operation is now Clone (#1170)&Operation as well as Operation (#1169)QueryFragment derive now supports the rename_all attribute (#1167)@oneOf support to introspection (#1177)cynic-querygen now has a field_overrides option that can be used toQueryFragments (#1184)cynic_querygen has a new interface based around the Generator typeNote that this is the last release that will be pushed to github - development of cynic will continue over on codeberg.org/obmarg/cynic.
InputObject on a oneOf type will automatically skip serializing all of
it's null fields (#1179)InputObject can now be derived on enums for oneOf inputs (#1174)Operation is now Clone (#1170)&Operation as well as Operation (#1169)QueryFragment derive now supports the rename_all attribute (#1167)@oneOf support to introspection (#1177)cynic-querygen now has a field_overrides option that can be used to
customize the type of individual scalar fields in generated QueryFragments (#1184)cynic_querygen has a new interface based around the Generator type
(#1187)The graphql_type attribute on fields of variable structs can now specify generic types instead of just single named types.
graphql_type attribute on fields of variable structs can now specifyOptional fields on a QueryFragment can now be marked with #[cynic(default)] . If this directive is present the field does not have to be wrapped in Op
QueryFragment can now be marked with#[cynic(default)]. If this directive is present the field does not have toOption and the Default impl of the type will be used if thecynic-introspection now includes directives in its SDL (#1140)Added initial suppport for directives: @skip , @include are supported, and other field level directives can be used provided they don't require specif
@skip, @include are supported, andmutation are used as enumFields named str are now supported
Thanks to the people who contributed to this release:
Added OperationBuilder::build_with_variables_inlined which can be used to build a query string with variables inlined
OperationBuilder::build_with_variables_inlined which can be used toQueryVariableLiterals, a trait & derive macro that can be used toupdate rust crate trycmd to 0.15
Pulled in the latest cynic-parser, this should have no user facing impact.
Schema file should no longer cause clippy warnings if clippy::nursery is on.
clippy::nursery is on.Users of the reqwest integration can now control the type used for error extensions
reqwest integration can now control the type used for errorFixed a regresion in 3.6.0: schemas with directives on the schema definition will now parse
schemaFixed an issue where derive(Scalar) would fail on types with a serialize function that was not serde::Serialize::serialize
derive(Scalar) would fail on types with a serialize
function that was not serde::Serialize::serialize
(#909)Operation is now Debug when Variables is Debug
Operation is now Debug when Variables is DebugUpdates reqwest to 0.12 - this is breaking for users of the http-reqwest or http-reqwest-blocking features who will need to upgrade to reqwest 0.12.
http-reqwest orhttp-reqwest-blocking features who will need to upgrade to reqwest 0.12.Handle disabled introspection better in cynic-introspection & cynic-cli . This is technically a breaking change, but it's small and fixes a bug so I'l…
cynic-introspection & cynic-cli.cynic-introspection & cynic-cli.
This is technically a breaking change, but it's small and fixes a bug so I'll
allow it.If you accidentally write a recursive query without the recurse attribute you'll now get a panic suggesting to use recurse . This may cause false posi
recurse attributerecurse. This may cause falserecurse attribute now works if an InlineFragments derive is used inrecurse attribute
you'll now get a panic suggesting to use recurse. This may cause false
positives if you're writing a particularly large query - users should raise
an issue if I've picked a number that's too low.recurse attribute now works if an InlineFragments derive is used in
the recursive path.Fixed an issue with object literals inside arguments
Enum s can now opt out of exhaustiveness checking with the non_exhaustive attribute
Enums can now opt out of exhaustiveness checking with the non_exhaustivecynic-introspection now omits the {} if a definition is empty.
cynic-introspection now omits the {} if a definition is empty.GraphQlResponse is now Clone provided its contents are also
GraphQlResponse is now Clone provided its contents are alsoFixed an issue where #[cynic(flatten)] would not work on scalar fields.
#[cynic(flatten)] would not work on scalar fields.cynic-introspection now escapes deprecated strings that require it in SDL.
QueryVariables derive now supports skip_serializing_ifcynic-cli has a new querygen command as an alternative to the#[cynic(spread)] attribute now outputs an inline fragment in GraphQL#[cynic(spread)] more than once no longer results in rust compilecynic-introspection now escapes deprecated strings that require it in SDL.Deprecation reasons will now correclty be wrapped in strings
cynic-introspection:
? where it means !Boolean scalarBuilding binaries with different GitHub action
Added support for introspecting the specifiedByUrl field of scalars on servers supporting GraphQL 2021
specifiedByUrl field of scalars oncynic-introspection can now output SDLCapabilitiesQuery to cynic-introspection, which can detectQueryFragment now allows users to specify features for parts of the query,cynic-cli, a CLI for cynic that can introspect remote servers.Fixed an issue where InlineFragments fallbacks would fail to decode if the data contained anything other than just the __typename .
InlineFragments fallbacks would fail to decode if the__typename.Added an exhaustive attribute for InlineFragments on union types. If present this attribute will cause compile errors if the enum is missing a variant
exhaustive attribute for InlineFragments on union types. If#[cynic::schema] module.impl_scalar! and derive(Scalar) can now be used on built in scalars.Cargo.tomlFix Variable definition for Vec<T> in #[cynic::schema] output.
Variable definition for Vec<T> in #[cynic::schema] output.Variable definition for Vec<T> in #[cynic::schema] output.Fixed some more corner cases in string literal escaping
Option wrappingcynic_codegen::output_schema_module is now deprecated in favour of register_schema .
See the upgrade guide in the book for help upgrading.
QueryBuilder, MutationBuidler & SubscriptionBuilder no longer have lifetimes.QueryFragment no longer has a lifetime.QueryVariables::Fields must now implement the QueryVariablesFields trait.derive(QueryVariables) has been changed quitecynic. This hopefully shouldn't affect most users but may do so if youcynic-introspection for running an introspection query against acynic-introspection::Schema which converts the introspection outputcynic_codegen::register_schema, a mechanism for pre-registering schemasschema attribute macro to declare the schema module forrkyv feature flag which optimises the pre-registered schemas withrkyv library. This makes cynic much more efficient when working withEnum derive now supports fallback variantsOperation::new to allow Operation to be used in tests.cynic_codegen::output_schema_module is now deprecated in favour of register_schema.FragmentArguments derive.arugment_struct attribute.Removed the deprecated FragmentArguments derive.
Enum derive now supports fallback variantsOperation::new to allow Operation to be used in tests.FragmentArguments derive.arugment_struct attribute.Added from_sdl method to schema registration.
from_sdl method to schema registration.Schema file should no longer cause clippy warnings if clippy::pedantic is on.
clippy::pedantic is on.cynic_codegen::output_schema_module is now deprecated in favour of register_schema .
QueryBuilder, MutationBuidler & SubscriptionBuilder no longer have lifetimes.QueryFragment no longer has a lifetime.QueryVariables::Fields must now implement the QueryVariablesFields trait.derive(QueryVariables) has been changed quitecynic. This hopefully shouldn't affect most users but may do so if youcynic-introspection for running an introspection query against acynic-introspection::Schema which converts the introspection outputcynic_codegen::register_schema, a mechanism for pre-registering schemasschema attribute macro to declare the schema module forrkyv feature flag which optimises the pre-registered schemas withrkyv library. This makes cynic much more efficient when working withcynic_codegen::output_schema_module is now deprecated in favour of register_schema.GraphQlErrorLocation & GraphQlErrorPathSegment are no longer accidentally private.
GraphQlErrorLocation & GraphQlErrorPathSegment are no longer accidentally private.GraphQlErrorLocation & GraphQlErrorPathSegment are no longer accidentally private.You no longer have to specify the Extensions parameter on GraphQLError if you don't have any extensions.
Extensions parameter on GraphQLError ifExtensions parameter on GraphQLError if
you don't have any extensions.A QueryFragment used inside an InlineFragment can now have a __typename field.
__typenameThe macro generated code now compiles under -D rust-2018-idioms
-D rust-2018-idiomsFix an issue where you'd get extremely weird compiler errors if your QueryFragment had fields named key or map .
QueryFragment had fields named key or map.QueryFragment had fields named key or map.The generator and derive macros are now aware of the implicit __typename that every object & interface type gets.
__typenameFixed a compilation error when targeting wasm with the http-reqwest feature enabled.
http-reqwest featureExposed the StreamingOperation type which was accidentally not exported in the move to v2.0 .
StreamingOperation type which was accidentally not exported inv2.0.The use_schema output has been re-organised to reduce the chances of clashes. This is technically a breaking change, but only if you're writing querie…
use_schema output has been re-organised to reduce the chances ofInlineFragments derives for union types now allow a fallback that receives the __typename
InlineFragments derives for union types now allow a fallback that receives__typenameschema_for_derives no longer ignores QueryVariables structs.Some of the derives weren't recasing GraphQL types/fields correctly, leading to weird errors.
impl_scalar! couldn't be used as variables. Now theyimpl_scalar! couldn't be used as variables. Now they
can.This release contains a lot of breaking changes.
This release contains a lot of breaking changes.
See the upgrade guide for help
arg.X syntax. Instead#[arguments(someArg: $my_variable)], where my_variable is a field on yourQueryVariables struct.snake_casing them.serde::Serialize and serde::Deserialize wheredecode_response function on the operation (unless you're using an httpOperation has changed:
http extension traits have had their signatures changed to accomodateOperation. Their use should still be the same.Enum can no longer be shared between schemas. If you were doing this,Enums and provide conversion functions beteween theInlineFragments now always require a fallback and no longer performQueryBuilder, MutationBuilder and SubscriptionBuilder no longer have aResponseData associated type.QueryBuilder::build, MutationBuilder::build andSubscriptionBuilder::build now take their argument by value not bysurf, reqwest & reqwest-blocking features have been renamed tohttp-surf, http-reqwest & http-reqwest-blocking respectively.http-reqwest feature no longer uses the native-tls feature. Userstls features of reqwest themselves.surf-h1-client, surf-curl-client, surf-wasm-client,surf-middleware-logger & surf-encoding features have been removed. IfCargo.toml.cynic no longer re-exports serde_jsonGraphQlError & GraphQlResponse structs no longer contain aserde_json::Value for extensions. They now have generic parameters that youuse_schema macro is no longer re-cased.query_module attribute for the various derive/attributeschema_module which behaves the same.FragmentArguments trait & derive has been renamed to QueryVariablesargument_struct attribute for QueryFragment and InlineFragments hasvariables#[cynic(flatten)] no longer allows you to omit a list type on output fields.#[arguments(someArg: {"someField": 1})]cynic no longer uses inflector to re-case things. Hopefully this won'tInlineFragments now take their expected typenames from the QueryFragmentuse_schema output can now live in a separate crate from queries, whichimpl_scalarArc or RcRemoved the following deprecated things: query_dsl! , the query_module module attribute, the GraphQLError , GraphQLResponse , GraphQLErrorLocation & G…
CynicReqwestError enum (behind the reqwest & reqwest-blockingGraphQlResult & PossiblyParsedData types (which weren't beingquery_dsl!, the query_moduleGraphQLError, GraphQLResponse,GraphQLErrorLocation & GraphQlErrorPathSegment type aliases.InlineFragments derive now supports a rename attribute on variantsQueryFragment derive now supports fields with types that take genericDateTime<Utc> from chrono. Previously this wouldNew generator features, so I'm putting them out in a point release:
New generator features, so I'm putting them out in a point release:
ArgumentStructsFloat scalars in the generator.self, super etc. which can't be made intoRemoved the no longer used chrono feature. It didn't enable any code so downstreams shouldn't really be broken by this (other than a possible Cargo.to
chrono feature. It didn't enable any code soCargo.toml tweak)InputObjects that itInputObjects were arguments to a leafInputObject now serializes fields in a stable order.
InputObject now serializes fields in a stable order.You can now spread a QueryFragment into another QueryFragment with the #[cynic(spread)] field attribute.
spread a QueryFragment into another QueryFragment with the#[cynic(spread)] field attribute.QueryFragment derive now supports renaming fields.This release is only of the cynic crate - other crates remain at v0.13.1
This release is only of the cynic crate - other crates remain at v0.13.1
Fixes an issue where cynic would incorrectly case module certain names in the use_schema output
use_schema outputThere are a number of breaking changes here, though they shouldn't require too much work for users to update. An example of an upgrade can be found he…
There are a number of breaking changes here, though they shouldn't require too
much work for users to update. An example of an upgrade can be found
here.
cynic::Scalar derive has some new requirements:
serde::Serialize for yourschema_module parameter. Theschema_for_derives macro will automatically insert this (if you're usinguse super::schema; to ensure it'sgraphql_type parameter. This is requiredquery_dsl.chrono, url, uuid etc.). The impl_scalar macro hasserde::Serialize) in their queries.select functions generated for scalar fields in query_dsl now takequery_dsl now defines markers for all the scalar types. As such youarg = "hello".into()) will no longerInputTypeuuid, chrono, bson, and url features have been retired. If youScalar with the impl_scalar!SerializableArgument has been retired in favour of just usingserde::Serialize.cynic::Enum::select now includes the TypeLock of thecynic::EnumIntoArgument has been removed in favour of the new InputType trait.cynic::SerializeError no longer exists.graphql-ws-client.GraphQLError, GraphQLResponse, & GraphQLResult have all been deprecatedGraphQlError, GraphQlResponse, & GraphQlResult. The types arequery_dsl! has been deprecated in favour of a similar macro named use_schema!query_dsl module schema instead.cynic_codegen::output_query_dsl is now named cynic_codegen::output_schema_module.query_module attribute macro has been deprecated in favour ofschema_for_derivesquery_module parameter to the derives has been deprecated in favour ofschema_module.query_module attr of the module they were defined in.graphql_type parameter for most of the derives is now optional. ItThe cynic::Scalar derive output no longer contains a spurious ? that clippy warns about in Rust 1.51.
cynic::Scalar derive output no longer contains a spurious ? thatHopefully fixed the build of documentation for docs.rs
Your coding agent can read these notes before it upgrades. Set up the MCP server →