graphql-parser icon indicating copy to clipboard operation
graphql-parser copied to clipboard

Int as_i32 feature for backward compliant GraphQL spec compliance

Open ittorchbearer opened this issue 2 years ago • 4 comments

added as_i32 backward-compatible feature flag to allow running to GraphQL spec here: https://graphql.org/learn/schema/#scalar-types

ittorchbearer avatar Apr 28 '22 19:04 ittorchbearer

I'll go through and change it around a bit. I leaned too heavily on minimal change over correctness.

On Thu, Apr 28, 2022, 7:43 PM Ben Boeckel @.***> wrote:

@.**** commented on this pull request.

In src/common.rs https://github.com/graphql-rust/graphql-parser/pull/65#discussion_r861384213 :

impl Number {

  • #[cfg(not(feature = "as_i32"))]

Feature flags should be additive. We can still provide as_i64 even with an i32 because that has an impl Into.

— Reply to this email directly, view it on GitHub https://github.com/graphql-rust/graphql-parser/pull/65#pullrequestreview-957146193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQTIR7TEHJNXGMZTK6UDX6TVHMPA3ANCNFSM5UTSF2HQ . You are receiving this because you authored the thread.Message ID: @.***>

ittorchbearer avatar Apr 28 '22 23:04 ittorchbearer

FWIW, a CI job that runs with the feature flag would also likely be appreciated.

mathstuf avatar Apr 28 '22 23:04 mathstuf