I struggled with this for hours before finding out that you have to use from_
instead of from
when using gremlin javascript.
After digging
Gremlin Language Variants (GLVs) are given some latitude in terms of how they implement the Gremlin language so that it feels as close to the syntax and programming idioms of the native language and thus avoid too much pollution from Java. In other words, if you're using gremlin-javascript it should feel like your coding in JS and not Java. So, you will see slight differences among GLVs from time to time.
So, with respect to from_
specifically, we typically use an underscore when we have a conflict in a native language with a reserved keyword. In Java from
is fully acceptable, but in other languages it is not. For Javascript, from
is currently not a reserved word, but we are preparing for the eventual form of import ... from
which is coming in the future.
As for documentation, I'm not aware of too much more than what you have already found on the TinkerPop web site. We hope to have more examples and information available in our next release.