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

Custom Scalar Specification URLs #1171

Merged
merged 2 commits into from
Nov 25, 2021
Merged

Custom Scalar Specification URLs #1171

merged 2 commits into from
Nov 25, 2021

Conversation

ghostdogpr
Copy link
Owner

Part of #1159

implicit val bigIntSchema: Schema[Any, BigInt] = scalarSchema("BigInt", None, None, IntValue(_))
implicit val doubleSchema: Schema[Any, Double] = scalarSchema("Float", None, None, FloatValue(_))
implicit val floatSchema: Schema[Any, Float] = scalarSchema("Float", None, None, FloatValue(_))
implicit val bigDecimalSchema: Schema[Any, BigDecimal] = scalarSchema("BigDecimal", None, None, FloatValue(_))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can go ahead and provide urls for any of these. UUID for instance does have a specification I believe.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the official UUID spec, or something specific to GraphQL?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the spec links to https://tools.ietf.org/html/rfc4122

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we use ID for that, which is a standard scalar, and they say that standard scalars shouldn't have that URL.

Copy link
Collaborator

@frekw frekw Nov 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But maybe the types in TemporalSchema could link to the relevant RFCs?

@ghostdogpr ghostdogpr merged commit 1fe632c into master Nov 25, 2021
@ghostdogpr ghostdogpr deleted the specifiedBy branch November 25, 2021 11:40
Fluxx pushed a commit to Fluxx/caliban that referenced this pull request Jan 24, 2022
* Custom Scalar Specification URLs

* Use fold
Fluxx pushed a commit to Fluxx/caliban that referenced this pull request Jan 27, 2022
* Custom Scalar Specification URLs

* Use fold
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.

3 participants