Function code changes after save

q.Get(q.Function('yourFunction')) by itself returns an Expr class instance, which is made up of more Expr's. But what you see when you console.log or view the values in the console windows is the pretty, formated representation of the FQL query. It appears the bug is simply not printing the query properly, even though the underlying data is correct.

Until the bug is fixed you cannot copy-paste the printed output from the js driver or the web shell (because the web shell used the js driver).

This is not helpful for rapid prototyping in the shell, but I prefer, and strongly recommend to everybody, that all definitions be saved in (revision controlled) source code with a script that can bootstrap/update the database when changes are necessary. Until the bug is fixed, you might write a nodejs script to update things as required.

Some examples and discussion. There’s also fauna-schema-migrate to use or just be inspired by.

Like I said this does not help in the shell. It’s all work-around. Even though I’ve been working through various ways to store db definitions in code, I am constantly in the shell playing with ideas, so the bug is a bummer.