Adding property to the edges

Hi all -

I’m coming from neo4j. Is there a way in Dgraph (Im using Slash) to add properties to the edges? For example, in a social media graph the edge may be, “Reacts To” and then that edge may have a property like, “reaction” which could be one of “like, love, sad, angry”, etc. Is this possible in Dgraph?

Hi @tommo,

Dgraph does support Facets which are like properties on edges. You may read more about Facets over here.

1 Like

Thanks! I’m assuming from reading that doc that facets are not available in the GraphQL version of Dgraph?

Currently, Facets are not available in GraphQL.
This feature has been requested by users and is being worked upon. There is a related Facets RFC over here.

Awesome! I think for now, to keep it simple, I’m just going to use an intermediary node. Something like “User -REACTS-> Reaction <- HAS_REACTION- Post”