Skip to content
Discussion options

You must be logged in to vote

Hey @theguruofreason — short answer is that you can't, at least not through the GraphQL API directly. Facets are a DQL/RDF concept (key-value annotations on an edge), and the GraphQL layer doesn't generate any mutation input for setting them. So there's no field you can pass in an addPerson/updatePerson mutation to attach a facet to the people edge. There's a GraphQL idiomatic way to create a connector using model edge properties which is to promote the relationship to its own type — an intermediate node that holds the "facet" data as real fields. Not my favorite. Long story short, the GraphQL spec isn't all that "graph-y".

Having said that, Dgraph's GraphQL is just a wrapper over DQL, so…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@theguruofreason
Comment options

Answer selected by theguruofreason
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants