Skip to content

Commit 7aff4e3

Browse files
authored
Revert integer ID deserialization support (#562)
1 parent 1b68518 commit 7aff4e3

7 files changed

Lines changed: 4 additions & 116 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## Unreleased
9+
10+
- Revert integer ID deserialization support (introduced in #476).
11+
812
## 0.15.0 - 2025-12-08
913

1014
- Support for `deprecated` directive on InputValue fields (#553)

graphql_client/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub use graphql_query_derive::*;
3030
))]
3131
pub mod reqwest;
3232

33-
pub mod serde_with;
3433

3534
use serde::{Deserialize, Serialize};
3635
use std::collections::HashMap;

graphql_client/src/serde_with.rs

Lines changed: 0 additions & 41 deletions
This file was deleted.

graphql_client/tests/int_id.rs

Lines changed: 0 additions & 41 deletions
This file was deleted.

graphql_client/tests/int_id/query.graphql

Lines changed: 0 additions & 6 deletions
This file was deleted.

graphql_client/tests/int_id/schema.graphql

Lines changed: 0 additions & 12 deletions
This file was deleted.

graphql_client_codegen/src/codegen/selection.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -464,20 +464,6 @@ impl ExpandedField<'_> {
464464
qualified_type
465465
};
466466

467-
let is_id = self.field_type == "ID";
468-
let is_required = self
469-
.field_type_qualifiers
470-
.contains(&GraphqlTypeQualifier::Required);
471-
let id_deserialize_with = if is_id && is_required {
472-
Some(quote!(#[serde(deserialize_with = "graphql_client::serde_with::deserialize_id")]))
473-
} else if is_id {
474-
Some(
475-
quote!(#[serde(deserialize_with = "graphql_client::serde_with::deserialize_option_id")]),
476-
)
477-
} else {
478-
None
479-
};
480-
481467
let optional_skip_serializing_none = if *options.skip_serializing_none()
482468
&& self
483469
.field_type_qualifiers
@@ -516,7 +502,6 @@ impl ExpandedField<'_> {
516502
#optional_flatten
517503
#optional_rename
518504
#optional_deprecation_annotation
519-
#id_deserialize_with
520505
pub #ident: #qualified_type
521506
};
522507

0 commit comments

Comments
 (0)