Created
October 16, 2019 18:58
-
-
Save MichelDiz/4e1fee3be8f7c95daeab8e2aff291751 to your computer and use it in GitHub Desktop.
upsert test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upsert { | |
query { | |
getVals(func: has(products)) { | |
productsUid as uid | |
products @filter(eq(productId, 19610626)) { | |
productUid as uid | |
options @filter(eq(optionId, 32661491)) { | |
optionUid as uid | |
} | |
} | |
} | |
} | |
mutation { | |
set { | |
uid(productsUid) <products> uid(productUid) . | |
uid(productsUid) <dgraph.type> "Products" . | |
uid(productUid) <productId> "19610626" . | |
uid(productUid) <options> uid(optionUid) . | |
uid(productUid) <dgraph.type> "Product" . | |
uid(optionUid) <color> "blue" . | |
uid(optionUid) <dgraph.type> "Option" . | |
uid(optionUid) <optionId> "32661491" . | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment