Something went wrong. Try again.
Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
Something went wrong. Try again.
644 B · 28 lines
TSX
at main
1234567891011121314151617181920212223242526272829import { Router, action, query } from '@solidjs/router';import { FileRoutes } from '@solidjs/start/router';import { Suspense } from 'solid-js';import { createClient, Provider, cacheExchange, fetchExchange,} from '@urql/solid-start';
const client = createClient({ url: 'https://trygql.formidable.dev/graphql/basic-pokedex', exchanges: [cacheExchange, fetchExchange],});
export default function App() { return ( <Router root={props => ( <Provider value={{ client, query, action }}> <Suspense>{props.children}</Suspense> </Provider> )} > <FileRoutes /> </Router> );}