Skip to content

feat: Add incremental delivery support for @defer and @stream directives#36

Open
jwaldrip wants to merge 8 commits intoabsinthe-graphql:mainfrom
gigsmart:gigmart/defer-stream-incremental
Open

feat: Add incremental delivery support for @defer and @stream directives#36
jwaldrip wants to merge 8 commits intoabsinthe-graphql:mainfrom
gigsmart:gigmart/defer-stream-incremental

Conversation

@jwaldrip
Copy link
Copy Markdown

@jwaldrip jwaldrip commented Sep 5, 2025

Summary

This PR adds incremental delivery support to absinthe_graphql_ws for @defer and @stream directives.

⚠️ DEPENDENCY NOTICE

This PR depends on gigsmart/absinthe#gigmart/defer-stream-incremental
The main absinthe package must be merged first before this PR can be merged.

Features

  • GraphQL-WS protocol transport for incremental delivery
  • Uses Next/Complete messages for proper protocol compliance
  • Transport extensions for handling streaming responses
  • Maintains WebSocket connection efficiency during streaming

Implementation

  • Absinthe.GraphQL.WS.Incremental.Transport - Main transport adapter
  • Absinthe.GraphQL.WS.TransportExtensions - Protocol extensions

Testing

  • Protocol compliance tests
  • Message sequencing validation
  • Error handling scenarios

Breaking Changes

None - incremental delivery is opt-in and backward compatible.

jwaldrip and others added 8 commits September 5, 2025 12:11
Implements GraphQL-WS protocol transport for incremental delivery:
- GraphQL-WS transport adapter using Next/Complete messages
- Transport extensions for handling streaming responses
- Proper protocol compliance for incremental payloads

DEPENDS ON: absinthe package defer-stream-incremental branch must be merged first

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
- GraphQL-WS protocol implementation guide
- Client-side integration examples
- Message flow documentation
- Performance and monitoring guidance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…y testing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…very

Point to gigsmart/absinthe branch gigmart/defer-stream-incremental
for testing the @defer and @stream directive implementation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update installation dependencies in README_INCREMENTAL.md to point to the
remote git repositories instead of hex packages for testing incremental
delivery features.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Move incremental delivery content from temporary README_INCREMENTAL.md
into the main README.md file. Remove temporary file and properly document
the WebSocket incremental delivery features.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix JSON key ordering issues in tests by comparing decoded JSON objects
  instead of raw JSON strings
- Update Logger.warn/1 calls to Logger.warning/1 (deprecated API)
- Remove unused alias Absinthe.Incremental.Response
- Fix Application.get_env/2 reference in test support
- Update .tool-versions to use Elixir 1.17.3 and Erlang 27.3.4.2
- Update mix.exs to properly handle absinthe dependency override

All 26 tests now passing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jwaldrip
Copy link
Copy Markdown
Author

jwaldrip commented Feb 6, 2026

Checking in on the incremental delivery support for the WebSocket transport. This is a companion to absinthe#1377. Any feedback?

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