You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a use-case where we define numeric values as String scalar in the graphql schema. the reason for that is not to loose precision for fractions. We use them effectively as BigDecimal.
The problem with this is that we cannot use Positive, Negative and other constraints as they are only applicable on numeric values.
I tested locally and looking at the code AbstractPositiveNegativeConstraint could easily handle String scalar type by code: AbstractDirectiveConstraint#asBigDecimal() can cope with String.
The only thing would need to be changed is adding String to AbstractPositiveNegativeConstraint#getApplicableTypes
We could use BigDecimal scalar unit in our schema, but we'd like to avoid forcing our client to set up extra configuration on their side of graphql code generation
Would it be ok if I create such pull request to support String generally for all numeric kind of constraints?
The text was updated successfully, but these errors were encountered:
We have a use-case where we define numeric values as String scalar in the graphql schema. the reason for that is not to loose precision for fractions. We use them effectively as BigDecimal.
The problem with this is that we cannot use Positive, Negative and other constraints as they are only applicable on numeric values.
I tested locally and looking at the code
AbstractPositiveNegativeConstraint
could easily handle String scalar type by code:AbstractDirectiveConstraint#asBigDecimal()
can cope with String.The only thing would need to be changed is adding String to
AbstractPositiveNegativeConstraint#getApplicableTypes
We could use
BigDecimal
scalar unit in our schema, but we'd like to avoid forcing our client to set up extra configuration on their side of graphql code generationWould it be ok if I create such pull request to support String generally for all numeric kind of constraints?
The text was updated successfully, but these errors were encountered: