Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
at main 553 B view raw
1<template> 2 <Suspense> 3 <template #default> 4 <PokemonList /> 5 </template> 6 <template #fallback> 7 <div>Loading...</div> 8 </template> 9 </Suspense> 10</template> 11 12<script> 13import { provideClient, cacheExchange, fetchExchange } from '@urql/vue'; 14import PokemonList from './PokemonList.vue'; 15 16export default { 17 name: 'App', 18 setup() { 19 provideClient({ 20 url: 'https://trygql.formidable.dev/graphql/basic-pokedex', 21 exchanges: [cacheExchange, fetchExchange], 22 }); 23 }, 24 components: { 25 PokemonList, 26 }, 27}; 28</script>