react-fate 0.0.4 → 0.0.6

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.
Files changed (2) hide show
  1. package/README.md +2 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -766,7 +766,7 @@ Since clients can send arbitrary selection objects to the server, we need to imp
766
766
  Create a `views.ts` file next to your root tRPC router that exports the data views for each type. Here is how you can define a `User` data view for Prisma's `User` model:
767
767
 
768
768
  ```tsx
769
- import { dataView, DataViewResult } from '@nkzw/fate/server';
769
+ import { dataView, type Entity } from '@nkzw/fate/server';
770
770
  import type { User as PrismaUser } from '../prisma/prisma-client/client.ts';
771
771
 
772
772
  export const userDataView = dataView<PrismaUser>('User')({
@@ -775,9 +775,7 @@ export const userDataView = dataView<PrismaUser>('User')({
775
775
  username: true,
776
776
  });
777
777
 
778
- export type User = DataViewResult<typeof userDataView> & {
779
- __typename: 'User';
780
- };
778
+ export type User = Entity<typeof userDataView, 'User'>;
781
779
  ```
782
780
 
783
781
  _Note: Currently, fate provides helpers to integrate with Prisma, but the framework is not coupled to any particular ORM or database. We hope to provide more direct integrations in the future, and are always open to contributions._
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-fate",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "fate is a modern data client for React.",
5
5
  "homepage": "https://github.com/nkzw-tech/fate",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "lib"
29
29
  ],
30
30
  "dependencies": {
31
- "@nkzw/fate": "^0.0.4"
31
+ "@nkzw/fate": "^0.0.6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "^19.2.7",