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

Design async data injection mechanism #28

Open
4 tasks
justsml opened this issue Jul 19, 2022 · 1 comment
Open
4 tasks

Design async data injection mechanism #28

justsml opened this issue Jul 19, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@justsml
Copy link
Contributor

justsml commented Jul 19, 2022

Sometimes business rules need access to external data (from a Database, HTTP API, AI/ML Service, etc.)

Goals

  • Support JSON config-style declaration.
  • Securely reference API keys.
  • Pluggable / layered design. (Similar to inputMap & outputMap designs.)
  • Rely on existing 'client' APIs. (fetch, pg, etc)
@justsml justsml added the enhancement New feature or request label Jul 19, 2022
@chhatch
Copy link
Collaborator

chhatch commented Oct 30, 2022

Are you thinking something like this?

{
  map: '$IO::fetchItems()',
  run: { return: '$item.id' },
}

// fetchItems.config.json
{
  "url": "items.com/api?key=$ApiKey",
  "ApiKey": "SECURE_ENV_VAR",
  "method": "GET",
  "headers": [...],
  "dataPath": "body.data.items",
  "validator": "./validator.js"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants