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

Inject defaults into the planConnection query in the GTFS GraphQL schema #6339

Open
wants to merge 25 commits into
base: dev-2.x
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c10fb01
Draft for injecting defaults into GraphQL schema
optionsome Dec 17, 2024
2c42d14
Don't rely on directive for injecting defaults
optionsome Dec 17, 2024
c51b975
Use dependency injection for providing GraphQL schema
optionsome Dec 30, 2024
f639ce5
Only construct schema if feature flag is on
optionsome Dec 30, 2024
38b5a5b
Use a slightly prettier method for getting parent name
optionsome Dec 30, 2024
698349e
Replace preferences with route request
optionsome Dec 31, 2024
7162c7a
Add structure for injecting defaults for arguments and use it for
optionsome Dec 31, 2024
280fd45
Add default for search window and allow resetting it to null
optionsome Dec 31, 2024
45eea03
Add the rest of defaults
optionsome Dec 31, 2024
d298811
Fix schema comment about duration being seconds
optionsome Dec 31, 2024
5fe8da8
Move schema tests to new file
optionsome Dec 31, 2024
4f89618
Add tests for default injection
optionsome Dec 31, 2024
6f4a6fb
Merge remote-tracking branch 'upstream/dev-2.x' into plan-connection-…
optionsome Dec 31, 2024
c105fc2
Fix comment
optionsome Dec 31, 2024
3beb9be
Use schema visitor instead of directive wiring
optionsome Jan 3, 2025
813bbbf
Initialize schema on server start up
optionsome Jan 7, 2025
9157359
Remove unnecessary annotation
optionsome Jan 8, 2025
7cd815e
Split factory method into two versions
optionsome Jan 8, 2025
3b3d7ff
Merge remote-tracking branch 'upstream/dev-2.x' into plan-connection-…
optionsome Jan 8, 2025
9f72862
Add javadoc
optionsome Jan 8, 2025
f7585cc
Remove service wrapper
optionsome Jan 10, 2025
69de270
Fix comment
optionsome Jan 10, 2025
fc7c77f
Add missing annotation
optionsome Jan 14, 2025
76db9b5
Refactor defaults
optionsome Jan 14, 2025
a06ed19
Merge remote-tracking branch 'upstream/dev-2.x' into plan-connection-…
optionsome Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing annotation
optionsome committed Jan 14, 2025
commit fc7c77f61689c5717cd02a04acd47795864fb010
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
import dagger.Provides;
import graphql.schema.GraphQLSchema;
import jakarta.inject.Singleton;
import javax.annotation.Nullable;
import org.opentripplanner.apis.gtfs.SchemaFactory;
import org.opentripplanner.framework.application.OTPFeature;
import org.opentripplanner.routing.api.request.RouteRequest;
@@ -19,6 +20,7 @@ public class SchemaModule {

@Provides
@Singleton
@Nullable
public GraphQLSchema provideSchema(RouteRequest defaultRouteRequest) {
optionsome marked this conversation as resolved.
Show resolved Hide resolved
return OTPFeature.GtfsGraphQlApi.isOn()
? SchemaFactory.createSchemaWithDefaultInjection(defaultRouteRequest)