In #102 I had problems with the upsert in that example, which were resolved when setting name as a hard coded string value: NODE as q(func: eq(name, "foo")).
This confirms that what would to me seem as an intuitive way to combine query variables and upsert does not work.
Is it possible to do such an operation and if so, can you perhaps provide documentation for doing this correctly?
EDIT: this works only with variables defined inside the query, not with GraphQL-like variables (e.g $name, etc).
I believe this is what I’m looking for. I am referring to the pydgraph client functionality to correctly pass variables to the upsert query as shown in this standard query example: pydgraph/examples/simple/simple.py at master · dgraph-io/pydgraph · GitHub – I want to do the same for upsert queries.
I’ve not been able to pass python variables into an upsert query and I’ve had to resort to python string interpolation, which is far from ideal.