I’m wondering if there’s a way to perform a query and mutation in the same query. If I remember correctly in older versions (before transactions were implemented) we were able to run queries that collected results and performed mutations. Forgive the syntax below but it demonstrates briefly what I’m looking to accomplish:
In transactions, we had removed the query + mutations mix, due to that logic getting overly complex. I think we’ll reintroduce this functionality once we support Cypher, which has directives for updates.
Is there an easy way to do so with a transaction or will I have to a) query all the UIDs get the result back, b) within my application structure the mutation and then c) commit the whole transaction?
Would there be ANY way to avoid sending the UIDs back to my application and mutate them directly to replicate the old query + mutation mix?
i tried to use db to save uids that dgraph returned and you can query uid from db. you also can use this db to provide a service to search uid, before you insert data to dgraph you can try to ask the db if this data exist already in dgraph