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

make fraction part in DigitsConstraint optional #92

Merged
merged 4 commits into from
Oct 19, 2023

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