Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
at main 422 B view raw
1import React from 'react'; 2import { Client, Provider, cacheExchange, fetchExchange } from 'urql'; 3 4import PaginatedNpmSearch from './PaginatedNpmSearch'; 5 6const client = new Client({ 7 url: 'https://trygql.formidable.dev/graphql/relay-npm', 8 exchanges: [cacheExchange, fetchExchange], 9}); 10 11function App() { 12 return ( 13 <Provider value={client}> 14 <PaginatedNpmSearch /> 15 </Provider> 16 ); 17} 18 19export default App;