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

Attach values to the context object within resolvers #129

Open
jeggy opened this issue Feb 16, 2021 · 0 comments
Open

Attach values to the context object within resolvers #129

jeggy opened this issue Feb 16, 2021 · 0 comments

Comments

@jeggy
Copy link
Member

jeggy commented Feb 16, 2021

it would be nice to have support for adding values unto the context inside a resolver, which then will be available inside other resolvers, just like when defining the root level definition of a context.

Could be something like this:

property<String>("myValue") {
  resolver { myType, ctx: Context ->
    val str: String = service.loadString(myType.id)
    ctx.put("myValue", str)
    str
  }
}
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