NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4829 most downloaded on crates.io
Procedural macro code generation for cynic - 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
76 releases · first in 2020
One column per quarter.
selection_set::inline_fragments now takes a backup selection set parameter for when we get an unexpected __typename .
selection_set::inline_fragments now takes a backup selection set parameter__typename.InlineFragments derive now performs exhaustiveness checking andInlineFragments has a new required function fallbackInlineFragments are now validated for exhaustiveness & correctness.InlineFragments now support a fallback variant for the case where usersQueryFragment can now be derived for interfaceschrono::NaiveTime is now supported as a Scalar when the chrono feature isOptional InputObject arguments can now be provided by reference. Previously this required a clone.
QueryFragment::fragment now accepts a FragmentContext rather than arguments. This change was neccesary to support recursive queries.
QueryFragment::fragment now accepts a FragmentContext rather thanQueryFragment::fragment directly -QueryBuilder::build orMutationBuilder::build. Note that these return an Operation so you no_ - you should now use a raw identifier (or rename) forEnums now default to rename_all = "SCREAMING_SNAKE_CASE" if notInputObjects now default to rename_all = "camelCase" if notrename_all = "None"kebab-case & SCREAMING-KEBAB-CASE rename_all rules - fairly#[cynic(recurse="N")]#[derive(InlineFragments)] on an enum.YYYY-MM-DDQueryBuilder & MutationBuilder traits for constructing Operationscynic::Id::Newtype or similar.rename_all doesn't work for them.InputObject derive no longer looks up scalars inside query_dsl (whichpub used in query_dsl).Clone on scalars as certain positions they canrename_all attribute is no longer case sensitive.Implemented SerializableArgument for the various scalars in the integrations folder. This was preventing them actually being used as scalars in input
integrations folder. This was preventing them actually being used asQueryFragment::fragment and InlineFragment::fragments now accept their Argument parameters by reference.
QueryFragment::fragment and InlineFragment::fragments now accept theirdefine_into_argument_for_scalar has been renamed toimpl_into_argument_for_optionsSerializableArgument for any Scalar.SerializableArgument now needs to be implemented on each Scalar. There'simpl_serializable_argument_for_scalar macro that does this. The ScalarScalarIntoArgument trait now has an Output associated type that is used forIntoArgument::into_argumentInputObject derive no longer complains if you omit optional fields.require_all_fieldsbson feature, which allows to use ObjectId in schemas, added.uuid feature, which allows to use Uuid in schemas, added.url feature, which allows to use Url in schemas, added.InputObjects may now contain fields inside a Box. This allows forInputObject types.surf feature enables integration with the surf HTTP client, so usersreqwest & reqwest-blocking features, which add support for thereqwest HTTP client.skip_serializing_if="path", similar to serde. This allows users to omitextensions field, which is expressed as anOption<serde_json::Value>.SerializableArgument no longer needs to be 'static + Send.FragmentArguments & InputObjects no longer need to be Clone.InputObject no longer has a serialize method - this is now handled by a SerializableArgument impl instead, which is generated by the InputObject deriv
Query has been renamed to Operation to make it clear it's used for bothQuery::new is now Operation::queryoptimised_query_modules feature from codegen, as it invovledquery_dsl for schemas with fieldsserde_json to their dependencies.cynic::serde_json and use that in our derive output.rename_all="SCREAMING_SNAKE_CASE" to Enums by default -PascalCase rust usually uses so thisQueryFragments.Integer fields are now i32 rather than i64 inline with the GraphQL spec. If larger integers are required a custom scalar should be used.
cynic_arguments attribute for passing arguments to GraphQL fields isargumentsIntoArgument<T> trait - defaultOption and reference types, so users don'tSome or explicitly clone their arguments.argument_struct attrs on types that have arguments rathergraphql_type on the root struct of named queries.SerializableArgument s are now required to be Send . Found this was required for using cynic in an async context. May revisit at some point to see if
SerializableArguments are now required to be Send. Found this wascynic::Id now derives PartialEq, Hash & Eq
cynic::Id now derives PartialEq, Hash & Eqcynic::Id::new functionquery_module should no longer cause errors on an individual derivequery_module span - the error information shouldQuery::body no longer exists, the Query itself is now directly serializable, and exposes the query type itself. Errors that were previously exposed by
Query::body no longer exists, the Query itself is now directlyquery type itself. Errors that wereQuery::body() will now be surfaced when serializing aArgument::new has been updated to take a SerialiableArgument itself.selection_set::Error.SerializableArgument::serialize & Scalar::encode now returnBox<std::error::Error> errors rather than ()cynic-codegen will now build with the rustfmt feature disabled.schema_path parameters are now relative to CARGO_MANFIEST_DIR rather than the current working directory. This fixes an issue with cargo workspace proj
schema_path parameters are now relative to CARGO_MANFIEST_DIR rather thanquery_dsl has been reworked. Before each field with arguments had onequery_dsl rework.query_dsl rework.Added chrono::DateTime scalar support behind a chrono feature flag.
cynic::selection_set module and all it's contents are now documented.QueryBody now exposes it's arguments & query fields for greater flexibilityquery_dsl now disables unused import warnings where appropriate.Id::inner & Id::into_inner functions - these were meant to bequery_dsl adds allow(dead_code) annotations so we don't get tons of deadquery_dsl no longer creates mutable Vec for fields without arguments -ID fields are now correctly given the cynic::Id type in query_dsl - previouslycynic::Id is now a cynic::Scalarderive(QueryFragment) where Enums inside lists would not beDecodeError now implements std::error::ErrorThe generated query_dsl no longer contains generated enums - users should provide their own enums and derive(cynic::Enum) on them. Cynic querygen can
query_dsl no longer contains generated enums - users shouldderive(cynic::Enum) on them. Cynic querygenquery_dsl no longer contains generated input objects - usersimpl cynic::InputObject on them. A#[derive(InlineFragments)] on an enum.#[derive(QueryFragment)] now explicitly checks for required/list typeoutput_query_dsl function suitable for running inside build.rscynic::query_module attribute macro that can be applied to modulesquery_module attribute provides them and fills themcynic::Enum derive that matches up a Rust enum with a GraphQL enum.cynic-querygen will automatically provide enums using this derive when aSelectionSet::and_then for chaining decode operations on selection sets.cynic::Scalar derive for newtype structs so that users can easilycynic::Id type to handle Ids in queries.cynic::InputObject trait to allow the query_dsl to handle- No changes
Some tweaks to the documentation.
Supports parsing & printing GraphQL schemas
Your coding agent can read these notes before it upgrades. Set up the MCP server →