Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 02d150c

Browse files
authored
fix:2750 dgraph AS example (#643)
1 parent c3a0d38 commit 02d150c

File tree

1 file changed

+4
-1
lines changed
  • sdk/assemblyscript/examples/dgraph/assembly

1 file changed

+4
-1
lines changed

sdk/assemblyscript/examples/dgraph/assembly/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export function upsertPerson(
119119
const query = `
120120
query {
121121
person as var(func: eq(firstName, "${nameToChangeFrom}"))
122+
}
122123
`;
123124
const mutation = `
124125
uid(person) <firstName> "${nameToChangeTo}" .`;
@@ -139,7 +140,9 @@ export function upsertPerson(
139140
export function deletePerson(uid: string): Map<string, string> | null {
140141
const mutation = `<${uid}> * * .`;
141142

142-
const mutations: dgraph.Mutation[] = [new dgraph.Mutation("", "", mutation)];
143+
const mutations: dgraph.Mutation[] = [
144+
new dgraph.Mutation("", "", "", mutation),
145+
];
143146

144147
return dgraph.execute(hostName, new dgraph.Request(null, mutations)).Uids;
145148
}

0 commit comments

Comments
 (0)