If you use createQuery, your query must be already loaded for the client. Imported in your startup file, or however you do. The reason is that
once a NamedQuery is registered, it is kept in a store. And when using createQuery() it will try to interogate that store.
The only reason we allow this, instead of importing it, is to allow testing it live with Grapher-Live package