Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
at main 898 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>Add Todo</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 { makeTodo } from './entities.js'; 19 import { getAllTodos, addTodo, addTodos } from './benchmarks.js'; 20 21 const todosToBeAdded = makeEntries(100, makeTodo); 22 23 const benchmark = async () => { 24 await addTodos(todosToBeAdded); 25 await getAllTodos(); 26 bench.start(); 27 await addTodo(); 28 bench.stop(); 29 }; 30 31 benchmark(); 32 </script> 33 </body> 34</html>