@zeroin.earth/appwrite-graphql 0.14.11 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1526,19 +1526,11 @@ var accountUpdatePrefs = gql(
|
|
|
1526
1526
|
`
|
|
1527
1527
|
);
|
|
1528
1528
|
function useUpdatePrefs() {
|
|
1529
|
-
const {
|
|
1529
|
+
const { account: account2 } = useAppwrite();
|
|
1530
1530
|
const queryResult = useMutation({
|
|
1531
1531
|
mutationFn: async ({ prefs }) => {
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1534
|
-
variables: {
|
|
1535
|
-
prefs: JSON.stringify(prefs)
|
|
1536
|
-
}
|
|
1537
|
-
});
|
|
1538
|
-
if (errors) {
|
|
1539
|
-
throw errors;
|
|
1540
|
-
}
|
|
1541
|
-
return data.accountUpdatePrefs;
|
|
1532
|
+
const newPrefs = await account2.updatePrefs(prefs);
|
|
1533
|
+
return newPrefs;
|
|
1542
1534
|
}
|
|
1543
1535
|
});
|
|
1544
1536
|
return { ...queryResult };
|