Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Inject defaults into the planConnection query in the GTFS GraphQL schema #6339
base: dev-2.x
Are you sure you want to change the base?
Inject defaults into the planConnection query in the GTFS GraphQL schema #6339
Changes from 22 commits
c10fb01
2c42d14
c51b975
f639ce5
38b5a5b
698349e
7162c7a
280fd45
45eea03
d298811
5fe8da8
4f89618
6f4a6fb
c105fc2
3beb9be
813bbbf
9157359
7cd815e
3b3d7ff
9f72862
f7585cc
69de270
fc7c77f
76db9b5
a06ed19
e958fba
e0a30ae
49954cc
8aa1ce0
0b49da8
d1e3eac
ab98348
09e0566
0f356a5
b578c3c
136149a
ef7018a
e18a417
64e5b45
09fef41
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider: A map and a bit of refactoring would make this code smaller and more readable. I switch might be faster but I doubt it. I would make builder for the map, so it would look like this:
The comments are just to explain my code, I would strip those away and add JavaDoc on the metods instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did something like that in 76db9b5 . I left out the Object::toString and just called toString on the object, but I can change that if you want. I'm not sure if this is more readable for me since how the method calls get split on multiple lines sometimes, but it's not much less readable either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably try to get ridd of the method chain(
preferences.bike().walking().speed()
). A simple way to do it is to group the calls and define varables and make a small change to the builder. There is two way to create an "inner" builder, you chose the one you like best. One restrict the scopeon(type, lambda)
- is safer, the otheron(type) : Builder
is make the code more compact and more readable.Like this