feat: add Result.assigns and prepare_req/1 for response metadata#65
Merged
Conversation
…data Allow users to capture arbitrary response metadata (e.g. GraphQL extensions) by overriding prepare_req/1 in their client module and using Result.put_resp_assign/3 in Req response steps. Closes #64 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fahchen
added a commit
that referenced
this pull request
Apr 17, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fahchen
added a commit
that referenced
this pull request
Apr 17, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fahchen
added a commit
that referenced
this pull request
Apr 17, 2026
## Summary - Bump version to 0.10.0 for #65 (Result.assigns and prepare_req/1) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
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
assignsfield toGrephql.Resultfor user-defined response metadataprepare_req/1callback to client modules for customizing%Req.Request{}before sendGrephql.Result.put_resp_assign/3helper for Req response stepsCloses #64
Test plan
mix precommitpasses (compile, format, credo, dialyzer, 619 tests)put_resp_assign/3andassigns_from_response/1prepare_reqoverride populates assigns%{}without override🤖 Generated with Claude Code