Skip to content

Instantly share code, notes, and snippets.

@bcherny
Last active August 3, 2020 04:44
Show Gist options
  • Save bcherny/ad96ba55fa8f1271474d63de3c01741e to your computer and use it in GitHub Desktop.
Save bcherny/ad96ba55fa8f1271474d63de3c01741e to your computer and use it in GitHub Desktop.

graph mutation language (graphml)

             connection
          /              \
         
  Node 1 -----------------> Node 2
         \    edge 1
          \_________________> Node 3
           \    edge 2
            \      ...
             \__________________> Node N
                     edge N

data types

Type Definition
Connection {count, edges: OrderedSet<Edge>, source: Node}
Count ?int
Edge {from: Node, to: Node}
Node Node

operations

connection: clear

count: increment count: decrement count: clear

edge: append edge: delete

node: create node: delete node: update

insert R(id: ID!) into [MyConnection1, MyConnection2]

delete D(id: ID!)

remove R(id: ID!) from [MyConnection1, MyConnection2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment