updated codegen, added client query generation, etc.

This commit is contained in:
lnn0q 2025-03-02 21:11:11 +02:00
parent 864f37a652
commit 9518787206
17 changed files with 5244 additions and 445 deletions

View file

@ -1,41 +0,0 @@
import { Text, Stack } from "@chakra-ui/react";
import { createLazyFileRoute } from "@tanstack/react-router";
import { gql, useQuery } from "@apollo/client";
export const Route = createLazyFileRoute("/")({
component: Index,
});
function Index() {
const { data } = useQuery(getBooksQuery);
return (
<Stack>
<Text>Hello world!</Text>
<Text>This is my template!</Text>
<Stack>
{data && (
<>
{data.booksMany.map((book: any) => (
<Stack key={book.id}>
<Text>{book.title}</Text>
<Text>{book.author}</Text>
</Stack>
))}
</>
)}
</Stack>
</Stack>
);
}
const getBooksQuery = gql`
query BooksMany {
booksMany {
id
author
title
}
}
`;