Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add createDefaultMetadataKeyInterceptor (#2368)
## Why is this change needed? Neynar requires x-api-key to access its hubs. This change makes it easy to include that (or any other) header. I tried to follow the docs to create a changes, but got an error. Am I running it from the wrong directory maybe? ``` % yarn changeset yarn run v1.22.22 error Command "changeset" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. bryan@Bryan-Neynar hub-monorepo % yarn run changeset yarn run v1.22.22 error Command "changeset" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a new function to create a metadata key interceptor for gRPC calls in the `hub-nodejs` package. ### Detailed summary - Added the `createDefaultMetadataKeyInterceptor` function in `packages/hub-nodejs/src/client.ts`. - The function takes a `key` and `value`, returning an interceptor that sets the specified metadata key with the given value if it is not already present. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information