Skip to content
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

feat: add name to DataLoader #326

Merged
merged 1 commit into from
Jan 22, 2023
Merged

feat: add name to DataLoader #326

merged 1 commit into from
Jan 22, 2023

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Jan 20, 2023

I came over open-telemetry/opentelemetry-js-contrib#1345 and figured having that just get the name from the data loader instead of creating an indirection seems a cleaner concept.

| *cache* | Boolean | `true` | Set to `false` to disable memoization caching, creating a new Promise and new key in the `batchLoadFn` for every load of the same key. This is equivalent to setting `cacheMap` to `null`.
| *cacheKeyFn* | Function | `key => key` | Produces cache key for a given load key. Useful when objects are keys and two objects should be considered equivalent.
| *cacheMap* | Object | `new Map()` | Instance of [Map][] (or an object with a similar API) to be used as cache. May be set to `null` to disable caching.
| Option Key | Type | Default | Description |
Copy link
Contributor Author

@SimenB SimenB Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just passed it through prettier after adding my new field.

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