@go-avro/avro-js 0.0.8-beta.3 → 0.0.8-beta.5

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.
@@ -168,7 +168,7 @@ declare module '../client/QueryClient' {
168
168
  id: string;
169
169
  }, StandardError, {
170
170
  content: string;
171
- sent_at?: number;
171
+ time_sent?: number;
172
172
  }>>;
173
173
  useCreateProposal(): ReturnType<typeof useMutation<{
174
174
  id: string;
@@ -45,9 +45,12 @@ AvroQueryClient.prototype.useCreateMessage = function (chatId) {
45
45
  });
46
46
  return message;
47
47
  },
48
- onMutate: (message) => {
48
+ onSuccess: (message) => {
49
49
  queryClient.setQueryData(['message', message.id], message);
50
+ },
51
+ onSettled: () => {
50
52
  queryClient.invalidateQueries({ queryKey: ['messages', chatId] });
53
+ queryClient.invalidateQueries({ queryKey: ['chats'] });
51
54
  },
52
55
  });
53
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.8-beta.3",
3
+ "version": "0.0.8-beta.5",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",