Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BigDecimal with a feature flag #165

Closed

Conversation

ambaldwin
Copy link

No description provided.

@codecov-io
Copy link

Codecov Report

Merging #165 into master will decrease coverage by 0.01%.
The diff coverage is 90.9%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #165      +/-   ##
=========================================
- Coverage   90.91%   90.9%   -0.02%     
=========================================
  Files          95      96       +1     
  Lines       16288   16313      +25     
=========================================
+ Hits        14808   14829      +21     
- Misses       1480    1484       +4
Impacted Files Coverage Δ
juniper/src/lib.rs 82.5% <ø> (-2.12%) ⬇️
juniper/src/integrations/bigdecimal.rs 90.9% <90.9%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 254a61c...177bf86. Read the comment docs.

@theduke
Copy link
Member

theduke commented Apr 22, 2018

Hey @ambaldwin21 , thanks for the PR.

I'm afraid I'm sceptical about accepting this.
The other integrations we have are with popular and well-established crates.
BigDecimal is rather young and not widely used.
Accepting it as an integration would mean that we are stuck with it.

For now, if this is something you need often, you could publish a juniper_bigdecimal crate with a wrapper type BigDecimal(::bigdecimal::BigDecimal) that implements the required Juniper traits.

@theduke theduke closed this Apr 22, 2018
@sporto
Copy link
Contributor

sporto commented Aug 27, 2018

It seems like Diesel has adopted bigdecimal for the numeric PG type.

https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html

As numeric is widely used and Diesel is very likely to be used with Juniper, maybe this integration should be re considered.

@LegNeato
Copy link
Member

Moving discussion to #235

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants