Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

make fraction part in DigitsConstraint optional#92

Merged
bbakerman merged 4 commits intographql-java:mastergraphql-java/graphql-java-extended-validation:masterfrom
lgemela:make-digits-contraint-optionallgemela/graphql-java-extended-validation:make-digits-contraint-optionalCopy head branch name to clipboard
Oct 19, 2023
Merged

make fraction part in DigitsConstraint optional#92
bbakerman merged 4 commits intographql-java:mastergraphql-java/graphql-java-extended-validation:masterfrom
lgemela:make-digits-contraint-optionallgemela/graphql-java-extended-validation:make-digits-contraint-optionalCopy head branch name to clipboard

Conversation

@lgemela
Copy link
Contributor

@lgemela lgemela commented Oct 16, 2023

raised based on discussion here graphql-java/graphql-java#3346

@bbakerman
Copy link
Member

The tests are failing. Not sure why - please have a look

@lgemela
Copy link
Contributor Author

lgemela commented Oct 18, 2023

should be fixed now. Optional does not really play well with error handling, I had to workaround it a bit.

Another solution would be to do this

 protected int getIntArg(GraphQLAppliedDirective directive, String argName) {
        return getIntArgOpt(directive, argName)
            .<RuntimeException>orElseThrow(() -> assertExpectedArgType(argName, "Int"));
    }

but IntelliJ does not like it that much, marking explicit type as unnecessary, which would be confusing to people.

@bbakerman bbakerman changed the title make fragment part in DigitsConstraint optional make fraction part in DigitsConstraint optional Oct 19, 2023
@bbakerman
Copy link
Member

Thanks for this

@bbakerman bbakerman merged commit c22f5ec into graphql-java:master Oct 19, 2023
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.