@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.mjs CHANGED
@@ -1526,19 +1526,11 @@ var accountUpdatePrefs = gql(
1526
1526
  `
1527
1527
  );
1528
1528
  function useUpdatePrefs() {
1529
- const { graphql: graphql2 } = useAppwrite();
1529
+ const { account: account2 } = useAppwrite();
1530
1530
  const queryResult = useMutation({
1531
1531
  mutationFn: async ({ prefs }) => {
1532
- const { data, errors } = await graphql2.mutation({
1533
- query: accountUpdatePrefs,
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 };