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"`,
|
|
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"`,
|
|
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
|
-
|
|
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.
|
|
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.
|
|
43
|
+
"@nkzw/fate": "^1.3.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/react": "^19.2.
|
|
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"
|