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

Rover adds Scalar Float to schema graphql file #985

Closed
tc opened this issue Feb 9, 2022 · 3 comments · Fixed by #988, #1000 or #1003
Closed

Rover adds Scalar Float to schema graphql file #985

tc opened this issue Feb 9, 2022 · 3 comments · Fixed by #988, #1000 or #1003
Assignees
Labels
Milestone

Comments

@tc
Copy link

tc commented Feb 9, 2022

Description

When running rover graph introspect http://localhost:8666/graphql locally, it generates the file, it adds this custom scalar definition:

"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point)."
scalar Float

The previous apollo command apollo schema:download to generate the schema did not include Float as a scalar.

When used in a flutter project, the schema parser read scalars as custom data types vs using the native "float" data type.
https://discord.com/channels/559455668810153989/708387064919621694/940482796495978507

Steps to reproduce

run rover against a graphql server

Expected result

It should not add "scalar Float" because it is a native data type.

Actual result

and it adds "scalar Float"

Environment

@tc tc added bug 🐞 triage issues and PRs that need to be triaged labels Feb 9, 2022
@lrlna lrlna self-assigned this Feb 9, 2022
@lrlna lrlna removed the triage issues and PRs that need to be triaged label Feb 9, 2022
@lrlna
Copy link
Member

lrlna commented Feb 9, 2022

thanks for submitting this @tc! I am looking into getting you a fix.

lrlna added a commit that referenced this issue Feb 9, 2022
Since `Float` is a built-in GraphQL scalar type, it must not be part of the introspection results. This PR removes it from the SDL Rover produces. fixes #985

There is also a small tweak to 'interfaces' schema test to remove code examples within description, as it's not really necessary to test those specifics in an interface tests, and maintaining indentation is a bit of a pain!
EverlastingBugstopper pushed a commit that referenced this issue Feb 9, 2022
Since `Float` is a built-in GraphQL scalar type, it must not be part of the introspection results. This PR removes it from the SDL Rover produces. fixes #985

There is also a small tweak to 'interfaces' schema test to remove code examples within description, as it's not really necessary to test those specifics in an interface tests, and maintaining indentation is a bit of a pain!
@EverlastingBugstopper EverlastingBugstopper added this to the 0.4.2 milestone Feb 11, 2022
This was referenced Feb 11, 2022
@lrlna
Copy link
Member

lrlna commented Feb 14, 2022

@tc the fix is part of 0.4.2 release. Let me know if that works for you!

@tc
Copy link
Author

tc commented Feb 14, 2022

works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment