graphql-rust / graphql-parser

A graphql query language and schema definition language parser and formatter for rust
Apache License 2.0
355 stars 77 forks source link

Int as_i32 feature for backward compliant GraphQL spec compliance #65

Open ittorchbearer opened 2 years ago

ittorchbearer commented 2 years ago

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

ittorchbearer commented 2 years ago

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: @.***>

mathstuf commented 2 years ago

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

jhult commented 5 months ago

@ittorchbearer or @mathstuf, any update on this?

mathstuf commented 5 months ago

Waiting on updates from the author AFAIK.

LegNeato commented 4 months ago

(@ittorchbearer FYI)