@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.js
CHANGED
|
@@ -1594,19 +1594,11 @@ var accountUpdatePrefs = gql(
|
|
|
1594
1594
|
`
|
|
1595
1595
|
);
|
|
1596
1596
|
function useUpdatePrefs() {
|
|
1597
|
-
const {
|
|
1597
|
+
const { account: account2 } = useAppwrite();
|
|
1598
1598
|
const queryResult = useMutation({
|
|
1599
1599
|
mutationFn: async ({ prefs }) => {
|
|
1600
|
-
const
|
|
1601
|
-
|
|
1602
|
-
variables: {
|
|
1603
|
-
prefs: JSON.stringify(prefs)
|
|
1604
|
-
}
|
|
1605
|
-
});
|
|
1606
|
-
if (errors) {
|
|
1607
|
-
throw errors;
|
|
1608
|
-
}
|
|
1609
|
-
return data.accountUpdatePrefs;
|
|
1600
|
+
const newPrefs = await account2.updatePrefs(prefs);
|
|
1601
|
+
return newPrefs;
|
|
1610
1602
|
}
|
|
1611
1603
|
});
|
|
1612
1604
|
return { ...queryResult };
|