Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
at main 968 B view raw
1<!doctype html> 2<html lang="en"> 3 <head> 4 <meta charset="UTF-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 6 <title>100 Writes Complex</title> 7 <script> 8 window.process = { env: { NODE_ENV: 'development' } }; 9 </script> 10 </head> 11 12 <body> 13 <div id="root"></div> 14 <script type="module"> 15 import urqlClient from './urqlClient.js'; 16 import * as bench from '/bench.js'; 17 import { makeEntries } from './makeEntries.js'; 18 import { makeAuthor } from './entities.js'; 19 import { getAllAuthors, addAuthors } from './benchmarks.js'; 20 21 // create authors to be added/written 22 const hundredAuthors = makeEntries(100, makeAuthor); 23 24 // benchmark to be performed to assess urql client performance 25 const benchmark = async () => { 26 bench.start(); 27 await addAuthors(hundredAuthors); 28 bench.stop(); 29 }; 30 31 benchmark(); 32 </script> 33 </body> 34</html>