-
Notifications
You must be signed in to change notification settings - Fork 27
feat: add Viaduct Development Server (devserve) with GraphiQL IDE #224
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
Open
fireboy1919
wants to merge
24
commits into
airbnb:main
Choose a base branch
from
fireboy1919:add_devserv_mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skevy
reviewed
Nov 19, 2025
skevy
reviewed
Nov 19, 2025
gradle-plugins/application-plugin/src/main/kotlin/viaduct/gradle/ViaductApplicationPlugin.kt
Outdated
Show resolved
Hide resolved
- Changed 'hot-reloading' to 'auto-reloading' throughout documentation and code - Replaced manual ProcessBuilder with Gradle's javaExec task in ViaductApplicationPlugin - Fixed configuration cache issue in devserve module by using Delete task configuration directly
…issues - Add versionMapping to devserve publishing to resolve actual versions instead of "INCLUDED" placeholder in published POM - Migrate from deprecated project.javaexec to ExecOperations.javaexec for Gradle 9.x compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
154ffa5 to
ee8d756
Compare
The testCodeCoverageVerification task was lost during merge and lacked proper configuration. This restores it with proper executionData, classDirectories, and sourceDirectories from the aggregated report. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Rename the annotation used to mark ViaductFactory implementations for automatic discovery from @ViaductApplication to @ViaductConfiguration for better clarity about its purpose.
Introduces the @ViaductDevServeConfiguration annotation and ViaductDevServeProvider interface to allow demo apps to provide their Viaduct instance to DevServe via their DI framework. - Add ViaductDevServeProvider interface and annotation - Add DevServe providers for cli-starter, jetty-starter, ktor-starter - Add StarWarsDevServeProvider for Micronaut-based starwars app - Update demo apps to use shared ViaductConfiguration singletons - Both production and devserve now share the same Viaduct instance
f8a8deb to
c61ed86
Compare
Remove duplicated GraphiQL resources and generator from devserve. Instead, delegate to the GraphiQL HTML provided by the service-wiring module which now owns these resources. - Remove buildSrc GraphiQLHtmlCustomizer - Remove devserve graphiql resources (js files) - Remove downloadGraphiQLHtml task from devserve build - Update GraphiQLHtml.kt to delegate to service-wiring
Revert starwars demo app to use its original GraphiQL setup. DevServe will only be tested in helloworld and ktor starter apps.
Rename DevServe to Viaduct Server since it may be used in production. - Rename devserve/ directory to serve/ - Rename DevServeServer class to ViaductServer - Rename ViaductDevServeConfiguration to ViaductServerConfiguration - Rename ViaductDevServeProvider to ViaductServerProvider - Update package names from viaduct.devserve to viaduct.serve - Update all demo app provider classes - Update docs and settings files
…allback - Make DefaultViaductFactory internal (not part of public API) - Remove constructor parameters (no longer accepts packagePrefix) - Use DefaultViaductFactory as automatic fallback when no @ViaductServerConfiguration is found (instead of throwing error) - Add INFO logs explaining zero-arg constructor limitation - Update FactoryDiscovery to return DefaultViaductFactory for empty case - Update tests to reflect new behavior
…izations Cherry-picked from move-graphiql-generator branch to support serve module. Adds: - Generated GraphiQL HTML with Viaduct customizations - introspection-patch.js: Fixes GraphQL Java compatibility with GraphiQL 5 - global-id-plugin.jsx: Global ID encode/decode plugin - jsx-loader.js: Runtime JSX transpilation - GraphiQLHtmlCustomizer for regenerating HTML
- Add test to verify JS files (jsx-loader.js, introspection-patch.js, global-id-plugin.jsx) are served from service-wiring resources - Improve resource loading to use multiple classloader strategies: thread context classloader first, then class's own classloader - This ensures resources from service-wiring are found reliably
cbde491 to
5857baa
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a new development server feature (
devserve) to Viaduct applications, providing a lightweight local development environment with GraphiQL IDE integration.Key Features
1. Development Server (
devservetask)/graphiqlendpointviaduct.applicationGradle plugin2. Port Configuration
-Pdevserve.port=<port>3. GraphiQL Integration
4. Factory Discovery
@ViaductApplicationannotation5. Publishing Configuration
Changes
New Modules
DevServeServer.kt: Main server with Ktor integrationFactoryDiscovery.kt: Automatic ViaductFactory discoveryDefaultViaductFactory.kt: Default factory implementationGraphiQLHtml.kt: GraphiQL HTML generationModified Files
gradle-plugins/application-plugin/src/main/kotlin/viaduct/gradle/ViaductApplicationPlugin.kt: Addeddevservetasksettings.gradle.kts: Added devserve:runtime module and dependency substitutionsettings.gradle.kts: Added dependency substitution for composite buildsUsage
Then open http://localhost:8080/graphiql to access the GraphiQL IDE.
Testing
All tests pass:
Demo Apps
All four demo applications now support devserve:
Breaking Changes
None
🤖 Generated with Claude Code