@@ -54,15 +54,15 @@ model Foo {
5454 import { useFindFirstpost_Item, useInfiniteFindManypost_Item, useCreatepost_Item } from './hooks';
5555
5656 function query() {
57- const { data } = useFindFirstpost_Item({include: { author: true }});
57+ const { data } = useFindFirstpost_Item({include: { author: true }}, { enabled: true, optimisticUpdate: false } );
5858 console.log(data?.viewCount);
5959 console.log(data?.author?.email);
6060 }
6161
6262 function infiniteQuery() {
6363 const { data, fetchNextPage, hasNextPage } = useInfiniteFindManypost_Item();
6464 useInfiniteFindManypost_Item({ where: { published: true } });
65- useInfiniteFindManypost_Item(undefined, { getNextPageParam: () => null });
65+ useInfiniteFindManypost_Item(undefined, { enabled: true, getNextPageParam: () => null });
6666 console.log(data?.pages[0][0].published);
6767 console.log(data?.pageParams[0]);
6868 }
@@ -143,14 +143,14 @@ ${sharedModel}
143143 import { useFindFirstpost_Item, useInfiniteFindManypost_Item, useCreatepost_Item } from './hooks';
144144
145145 function query() {
146- const { data } = useFindFirstpost_Item({include: { author: true }});
146+ const { data } = useFindFirstpost_Item({include: { author: true }}, { enabled: true, optimisticUpdate: false } );
147147 console.log(data.value?.viewCount);
148148 console.log(data.value?.author?.email);
149149 }
150150
151151 function infiniteQuery() {
152152 const { data, fetchNextPage, hasNextPage } = useInfiniteFindManypost_Item();
153- useInfiniteFindManypost_Item({ where: { published: true } });
153+ useInfiniteFindManypost_Item({ where: { published: true } }, { enabled: true, getNextPageParam: () => null } );
154154 useInfiniteFindManypost_Item(undefined, { getNextPageParam: () => null });
155155 console.log(data.value?.pages[0][0].published);
156156 console.log(data.value?.pageParams[0]);
@@ -217,15 +217,15 @@ ${sharedModel}
217217 import { useFindFirstpost_Item, useInfiniteFindManypost_Item, useCreatepost_Item } from './hooks';
218218
219219 function query() {
220- const { data } = get(useFindFirstpost_Item({include: { author: true }}));
220+ const { data } = get(useFindFirstpost_Item({include: { author: true }}, { enabled: true, optimisticUpdate: false } ));
221221 console.log(data?.viewCount);
222222 console.log(data?.author?.email);
223223 }
224224
225225 function infiniteQuery() {
226226 const { data, fetchNextPage, hasNextPage } = get(useInfiniteFindManypost_Item());
227227 useInfiniteFindManypost_Item({ where: { published: true } });
228- useInfiniteFindManypost_Item(undefined, { getNextPageParam: () => null });
228+ useInfiniteFindManypost_Item(undefined, { enabled: true, getNextPageParam: () => null });
229229 console.log(data?.pages[0][0].published);
230230 console.log(data?.pageParams[0]);
231231 }
0 commit comments