react-fate 1.3.1 → 1.3.2

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.
@@ -10,7 +10,7 @@ Returns the nearest `FateClient` from context.
10
10
 
11
11
  ### T
12
12
 
13
- `T` *extends* \[\{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `content`: `string`; `postId`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `id`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `post.add`: `MutationDefinition`\<`Post`, \{ `content`: `string`; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `id`: `string`; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `name`: `string`; \}, `AnyRecord`\>; \}\] = \[\{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `content`: `string`; `postId`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `id`: `string`; \}, `object` & `ItemRecord` & `object` & `object`\>; `post.add`: `MutationDefinition`\<`Post`, \{ `content`: `string`; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `id`: `string`; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `name`: `string`; \}, `AnyRecord`\>; \}\]
13
+ `T` *extends* \[\{ `categories`: `RootDefinition`\<`"Category"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `category`: `RootDefinition`\<`"Category"`, `unknown`\>; `comment`: `RootDefinition`\<`"Comment"`, `unknown`\>; `commentSearch`: `RootDefinition`\<`"Comment"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `event`: `RootDefinition`\<`"Event"`, `unknown`\>; `events`: `RootDefinition`\<`"Event"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `post`: `RootDefinition`\<`"Post"`, `unknown`\>; `posts`: `RootDefinition`\<`"Post"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `viewer`: `RootDefinition`\<`"User"`, `User` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `content`: `string`; `postId`: `string`; `select`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `id`: `string`; `select?`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `post.add`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `content`: `string`; `select`: `string`[]; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `select`: `string`[]; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `id`: `string`; `select`: `string`[]; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `args?`: `unknown`; `name`: `string`; `select`: `string`[]; \}, `Record`\<`string`, `unknown`\>\>; \}\] = \[\{ `categories`: `RootDefinition`\<`"Category"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `category`: `RootDefinition`\<`"Category"`, `unknown`\>; `comment`: `RootDefinition`\<`"Comment"`, `unknown`\>; `commentSearch`: `RootDefinition`\<`"Comment"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `event`: `RootDefinition`\<`"Event"`, `unknown`\>; `events`: `RootDefinition`\<`"Event"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `post`: `RootDefinition`\<`"Post"`, `unknown`\>; `posts`: `RootDefinition`\<`"Post"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `viewer`: `RootDefinition`\<`"User"`, `User` \| `null`\>; \}, \{ `comment.add`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `content`: `string`; `postId`: `string`; `select`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `comment.delete`: `MutationDefinition`\<`Comment`, \{ `args?`: `unknown`; `id`: `string`; `select?`: `string`[]; \}, \{ `author?`: \{ `banExpires`: `string` \| `null`; `banned`: `boolean` \| `null`; `banReason`: `string` \| `null`; `createdAt`: `string`; `displayUsername`: `string` \| `null`; `email`: `string`; `emailVerified`: `boolean`; `id`: `string`; `image`: `string` \| `null`; `name`: `string`; `password`: `string` \| `null`; `role`: `string`; `updatedAt`: `string`; `username`: `string` \| `null`; \} \| `null`; `authorId`: `string` \| `null`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `post?`: \{ `authorId`: `string`; `categoryId`: `string` \| `null`; `commentCount`: `number`; `content`: `string`; `createdAt`: `string`; `id`: `string`; `likes`: `number`; `title`: `string`; `updatedAt`: `string`; \}; `postId`: `string`; \}\>; `post.add`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `content`: `string`; `select`: `string`[]; `title`: `string`; \}, `Post`\>; `post.like`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `error?`: `"boundary"` \| `"callSite"`; `id`: `string`; `select`: `string`[]; `slow?`: `boolean`; \}, `Post`\>; `post.unlike`: `MutationDefinition`\<`Post`, \{ `args?`: `unknown`; `id`: `string`; `select`: `string`[]; \}, `Post`\>; `user.update`: `MutationDefinition`\<`User`, \{ `args?`: `unknown`; `name`: `string`; `select`: `string`[]; \}, `Record`\<`string`, `unknown`\>\>; \}\]
14
14
 
15
15
  ## Returns
16
16
 
@@ -15,7 +15,7 @@ request resolves.
15
15
 
16
16
  ### O
17
17
 
18
- `O` *extends* `FateRoots` = \{ `categories`: `RootDefinition`\<`"Category"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `category`: `RootDefinition`\<`"Category"`, `Category`[]\>; `comment`: `RootDefinition`\<`"Comment"`, `Comment`[]\>; `commentSearch`: `RootDefinition`\<`"Comment"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\> & `ConnectionResult`\<`AnyRecord`\>\>; `event`: `RootDefinition`\<`"Event"`, `Event`[]\>; `eventAttendee`: `RootDefinition`\<`"EventAttendee"`, `EventAttendee`[]\>; `events`: `RootDefinition`\<`"Event"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `post`: `RootDefinition`\<`"Post"`, `Post`[]\>; `posts`: `RootDefinition`\<`"Post"`, `ConnectionResult`\<\{\[`key`: `string`\]: `any`; \}\>\>; `tag`: `RootDefinition`\<`"Tag"`, `Tag`[]\>; `user`: `RootDefinition`\<`"User"`, `User`[]\>; `viewer`: `RootDefinition`\<`"User"`, `object` & `AnyRecord` \| `null`\>; \}
18
+ `O` *extends* `FateRoots` = \{ `categories`: `RootDefinition`\<`"Category"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `category`: `RootDefinition`\<`"Category"`, `unknown`\>; `comment`: `RootDefinition`\<`"Comment"`, `unknown`\>; `commentSearch`: `RootDefinition`\<`"Comment"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `event`: `RootDefinition`\<`"Event"`, `unknown`\>; `events`: `RootDefinition`\<`"Event"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `post`: `RootDefinition`\<`"Post"`, `unknown`\>; `posts`: `RootDefinition`\<`"Post"`, \{ `items`: `object`[]; `pagination`: `ConnectionPagination`; \}\>; `viewer`: `RootDefinition`\<`"User"`, `User` \| `null`\>; \}
19
19
 
20
20
  ## Parameters
21
21
 
package/lib/index.mjs CHANGED
@@ -72,7 +72,8 @@ function useView(view, ref) {
72
72
  return thenable;
73
73
  }
74
74
  mergedSnapshotRef.current = null;
75
- snapshotRef.current = snapshot.value;
75
+ const value = snapshot.value;
76
+ snapshotRef.current = value;
76
77
  return snapshot;
77
78
  }
78
79
  mergedSnapshotRef.current = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-fate",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "fate is a modern data client for React.",
5
5
  "homepage": "https://github.com/nkzw-tech/fate",
6
6
  "license": "MIT",
@@ -40,10 +40,10 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@nkzw/fate": "^1.3.1"
43
+ "@nkzw/fate": "^1.3.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/react": "^19.2.16",
46
+ "@types/react": "^19.2.17",
47
47
  "@types/react-dom": "^19.2.3",
48
48
  "react": "^19.2.7",
49
49
  "react-dom": "^19.2.7"