Conversation
Minimum allowed line rate is |
Correct grammatical errors and improve clarity in the documentation regarding dynamic headers and DataConnectorLink metadata.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for dynamic authentication headers through request-level arguments, enabling runtime header injection via Pre-NDC Request Plugins. The primary change allows headers to be passed through request_arguments.headers field and merged into HTTP requests before sending to external services.
Key changes:
- Added support for dynamic headers via
request_arguments.headersin query and mutation operations - Updated method signatures throughout the codebase to pass request arguments
- Added new documentation for dynamic headers forwarding
Reviewed Changes
Copilot reviewed 30 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| connector/query.go | Added request arguments parsing and passing to execution methods |
| connector/mutation.go | Added request arguments parsing and passing to execution methods |
| connector/internal/upstream.go | Updated HTTP client creation to merge dynamic headers |
| connector/internal/types.go | Added HTTPRequestArguments struct definition |
| connector/internal/client.go | Updated client to use request arguments |
| docs/dynamic_headers.md | New documentation for dynamic headers functionality |
| Multiple schema files | Comment corrections and best practice improvements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Support dynamic authentication headers with request-level arguments.
You can use a Pre-NDC Request Plugin to modify the request, and add dynamic headers in runtime via
request_arguments.headersfield, which is a string map. Those headers will be merged into the HTTP request headers before being sent to external services.{ // ... "ndcRequest": { // ... "request_arguments": { "headers": { "Authorization": "Bearer <token>", "X-Custom-Header": "foo" } } } }