-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Document that "at" and "get" have special meaning on steps #497
Comments
See |
@jemgillam please can you add details of this convention to the Grafast docs, probably in the section talking about writing your own step classes (since these are step class methods)? |
A plan resolver, rather than using This allows the step to learn more about how it is going to be used eg optimize its fetching to only retrieve the requested attributes ( For some steps this is a MUST, for example if When writing a step class, if the step represents an object, you SHOULD implement If optimizing isn't a concern, then you can implement those methods but you can defer to class MyStep extends ExecutableStep {
// ...
// For steps representing objects:
get(key) { return access(this, key); }
// For steps representing lists:
at(index) { return access(this, index); } If your step implements a |
#263 might be related |
#263 relates to |
at
should accept a single number argument and implies that the step is list-like (and you're accessing that index)get
should accept a single string argument and implies that the step is object-like (and you're accessing that key)If steps implement these methods but don't conform to expectations, then odd things might happen.
The text was updated successfully, but these errors were encountered: