You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 16, 2019. It is now read-only.
...
data classTree(valid:String, valparentId:String?)
...
type<Tree> {
// String - defines the key that will be sent from the [prepare] into [loader]// List<Tree> - defines the return type that the [loader] is required to return.// the loader is then required to return it in a map format like Map<String, List<Tree>>
dataProperty<String, List<Tree>>("children") {
// Step 2: This will only be called once.
loader { keys:List<String> ->
keys.map{ id -> id to listOf(Tree("SomeId", id)) }.toMap()
}
// Step 1: This will be called for each node in the list, or only once if it's not a list
prepare { parent:Tree-> parent.id }
}
}
Anyone is welcome with some input on how this could be achieved.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Implement DataLoader style.
I've been thinking about a structure like this:
Anyone is welcome with some input on how this could be achieved.
The text was updated successfully, but these errors were encountered: