Skip to content

Q: Why disallow queries which address multiple routes? #2

@acron0

Description

@acron0

Firstly, great library! I'm looking for some guidance on how best to approach this problem, which boils down to the way the graph is structured, I suspect.

(def graph
  {(with :functions/list get-functions)
   [:function/name
    :function/id
    :function/version]
   (with :workspaces/list-by-owner get-workspaces-by-owner)
   [:workspace/name
    :workspace/id]})

I'm fielding queries that look like this:

(dispatch graph '{(:workspaces/list-by-owner "Bob") [:workspace/name :workspace/id]
                  :functions/list [:function/name :function/id]})

So naturally, this is falling foul of the 'one root per query' constraint, and my first inclination is to challenge that constraint, unless there is a better way to build my graph which facilitates this kind of query. Any advice appreciated, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions