Adding list literals using Nquads

hey guys, I was having a problem while using Nquads for pushing data inside dgraph

  • Object Value is required to be a api.Value
    But there is no equivalent data type for lists for example [string] or [int]
    how can I add these using nquads?

You can use multiple set N-Quads to add to the list. For example, for predicate name with schema name: [string] ., you can add multiple values like this:

{
  set {
    _:x <name> "Alice" .
    _:x <name> "Bob" .
  }
}
1 Like

But in this case, schema needs to be defined before. But yes will work for my query, thanks :slight_smile: