-
Notifications
You must be signed in to change notification settings - Fork 535
feat: Implement @defer and @stream directives for incremental delivery #1377
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
jwaldrip
wants to merge
16
commits into
absinthe-graphql:main
Choose a base branch
from
gigsmart:gigmart/defer-stream-incremental
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.
Open
feat: Implement @defer and @stream directives for incremental delivery #1377
jwaldrip
wants to merge
16
commits into
absinthe-graphql:main
from
gigsmart:gigmart/defer-stream-incremental
+6,875
−29
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
- Fix mix absinthe.schema.json to use schema's adapter for introspection - Fix mix absinthe.schema.sdl to use schema's adapter for directive names - Update SDL renderer to accept adapter parameter and use it for directive definitions - Ensure directive names follow naming conventions (camelCase, etc.) in generated SDL 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
When a field has no description, it now inherits the description from its referenced type during introspection. This provides better documentation for GraphQL APIs by automatically propagating type descriptions to fields. - Modified __field introspection resolver to fall back to type descriptions - Handles wrapped types (non_null, list_of) correctly by unwrapping first - Added comprehensive test coverage for various inheritance scenarios - Updated field documentation to explain the new behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add @defer directive for deferred fragment execution - Add @stream directive for incremental list delivery - Implement streaming resolution phase - Add incremental response builder - Add transport abstraction layer - Implement Dataloader integration for streaming - Add error handling and resource management - Add complexity analysis for streaming operations - Add auto-optimization middleware - Add comprehensive test suite - Add performance benchmarks - Add pipeline integration hooks - Add configuration system
- Complete usage guide with examples - API reference for @defer and @stream directives - Performance optimization guidelines - Transport configuration details - Troubleshooting and monitoring guidance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix Ruby-style return statements in auto_defer_stream middleware - Correct Elixir typespec syntax in response module - Mark unused variables with underscore prefix - Remove invalid optional() syntax from typespecs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix supervisor startup handling in tests - Simplify test helpers to use standard Absinthe.run - Enable basic test execution for incremental delivery features - Address compilation issues and warnings Tests now run successfully and provide baseline for further development. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
This commit finalizes the implementation of GraphQL @defer and @stream directives for incremental delivery in Absinthe: - Fix streaming resolution phase to properly handle defer/stream flags - Update projector to gracefully handle defer/stream flags without crashing - Improve telemetry phases to handle missing blueprint context gracefully - Add comprehensive test infrastructure for incremental delivery - Create debug script for testing directive processing - Add BuiltIns module for proper directive loading The @defer and @stream directives now work correctly according to the GraphQL specification, allowing for incremental query result delivery. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Add detailed guide for @defer and @stream directives following the same structure as other Absinthe feature guides. Includes: - Basic usage examples - Configuration options - Transport integration (WebSocket, SSE) - Advanced patterns (conditional, nested) - Error handling - Performance considerations - Relay integration - Testing approaches - Migration guidance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Include guides/incremental-delivery.md in the mix.exs extras list so it appears in the generated documentation alongside other guides. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
ff57b93
to
59606f2
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
This PR implements the GraphQL @defer and @stream directives for incremental delivery as specified in the GraphQL spec.
Features
Key Components
Testing
Comprehensive test coverage including:
Breaking Changes
None - incremental delivery is opt-in and backward compatible.
Dependencies
This is the main package. Other Absinthe packages will need updates to fully support incremental delivery.