Moved from GitHub dgraph/5040
Posted by erhlee-bird:
Experience Report
Note: Feature requests are judged based on user experience and modeled on Go Experience Reports. These reports should focus on the problems: they should not focus on and need not propose solutions.
What you wanted to do
Leverage a complicated GraphQL± query and easily share with peers.
What you actually did
Incur encoding and network transmission costs for a large query.
Copy and paste snippets to others.
Why that wasn’t great, with examples
Would be great to effectively create shared query primitives that can be used by peers.
Almost like a plugin system.
By keeping the query stored server-side, we’d benefit from caching the query.
Even if the encoding and transmission costs are fairly negligible, would help simplify developing more and more complex queries.
register(pagerank query, query body...)
query({
q(func: pagerank(...)) {
...
}
})