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

Mapping with runtime arguments? #211

Open
aahventures opened this issue Mar 31, 2021 · 0 comments
Open

Mapping with runtime arguments? #211

aahventures opened this issue Mar 31, 2021 · 0 comments

Comments

@aahventures
Copy link

aahventures commented Mar 31, 2021

More of a question than a feature request, but I thought it was more appropriate than creating a bug.

Is your feature request related to a problem? Please describe.
I have a different look up table for different tenants, and would like to drop it in at runtime.

Describe the solution you'd like
Something like https://automapperts.netlify.app/docs/mapping-configuration/map-with-arguments

Describe alternatives you've considered
Considering https://github.com/nartc/mapper or writing wrapper code, something like

createSchemaWithContext(lookup: Lookup) {
  return createSchema<Destination, Source>({
    countryCode: s => lookup.country(s.countryId).code;
  });
}

I'm not sure what the best approach is. Any advice is appreciated.

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

No branches or pull requests

1 participant