<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dagobert Renouf on Medium]]></title>
        <description><![CDATA[Stories by Dagobert Renouf on Medium]]></description>
        <link>https://medium.com/@dgbrt?source=rss-c83f58ceb13d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6nkwLVuMZ7Mpzy_yycGiFg.png</url>
            <title>Stories by Dagobert Renouf on Medium</title>
            <link>https://medium.com/@dgbrt?source=rss-c83f58ceb13d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 01:23:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dgbrt/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Speed is a feature]]></title>
            <link>https://medium.com/@dgbrt/speed-is-a-feature-9362277242f9?source=rss-c83f58ceb13d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9362277242f9</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[ipad-pro]]></category>
            <category><![CDATA[apple]]></category>
            <dc:creator><![CDATA[Dagobert Renouf]]></dc:creator>
            <pubDate>Sun, 25 Dec 2016 10:52:41 GMT</pubDate>
            <atom:updated>2016-12-25T10:52:41.958Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Last summer, I switched my iPad 3 for a much more powerful iPad Pro.</em></p><p>The iPad pro is <a href="http://browser.primatelabs.com/geekbench3/compare/8167703?baseline=66066">10 times faster</a> than the iPad 3. New features aside, its increased responsiveness provides a much different experience:</p><ul><li>Safari loads most webpages in less than 2 seconds, whereas the old one often needed around 10</li><li>Going back and forth between apps is instantaneous and predictable (previously, the last opened app often had to be reloaded when I got back to it)</li><li>Sketching apps give instant feedback of all my actions (it used to lag for 500ms between input and display)</li></ul><p>Even with the exact same apps and features, the iPad Pro now enables me to browse the web efficiently, multi task heavily and create sketches like on a true drawing board.</p><p>For me it’s not just merely a better iPad, it’s a different product altogether.</p><p>Speed is a feature.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9362277242f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Importing data via a GraphQL endpoint]]></title>
            <link>https://medium.com/master-react-native/importing-data-via-a-graphql-endpoint-6b9f2feccc2c?source=rss-c83f58ceb13d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b9f2feccc2c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Dagobert Renouf]]></dc:creator>
            <pubDate>Fri, 04 Nov 2016 19:37:05 GMT</pubDate>
            <atom:updated>2016-11-04T22:21:48.420Z</atom:updated>
            <content:encoded><![CDATA[<p>You don’t always have access to the underlying database of your GraphQL endpoint. For example when you’re using a hosted backend service like <a href="http://graph.cool/">GraphCool</a> or <a href="http://www.reindex.io/">Reindex</a>.</p><p>If that’s the case and you need to import data into your app, I made a <a href="https://github.com/thedgbrt/graphql-importer">small npm script</a> that makes things easier.</p><h3>The script</h3><p>My starting point was the <a href="https://www.reindex.io/docs/importing-data/">example import code</a> found in the Reindex doc. However because it uses ES6 features, it can’t be run as is from the npm command line.</p><p>I packaged it into an npm script that transpiles ES6 to ES5, reads data from a JSON file instead of inline, and is now compatible with any simple GraphQL endpoint (thanks to <a href="https://github.com/kadirahq/lokka">Lokka</a>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36463afd5656d02ab90300763aeee653/href">https://medium.com/media/36463afd5656d02ab90300763aeee653/href</a></iframe><h3>Usage</h3><h4>Cloning the script</h4><p>Clone <a href="https://github.com/thedgbrt/graphql-importer">the repo</a> and install its npm dependencies:</p><pre>$ git clone <a href="https://github.com/thedgbrt/graphql-importer.git">https://github.com/thedgbrt/graphql-importer.git</a><br>$ cd graphql-importer<br>$ npm install</pre><h4>Creating a schema</h4><p>For this example I’m using <a href="http://graph.cool/">GraphCool</a>, as I found their interface to be very good at creating and visualizing data. Their team just released a great <a href="https://learnrelay.org/">Pokémon themed Relay tutorial</a>, so I’ll be staying in the same spirit with a simple Pokémon schema.</p><p>Add a <strong>name</strong> (String!) and a <strong>position</strong> (Int!) field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tmVpU2SrnG_yUAEX6p1kdA.png" /><figcaption><strong>I<em>d</em></strong>, <strong><em>createdAt</em></strong> and <strong><em>updatedAt</em></strong><em> are system fields added automatically. They vary depending on the backend provider.</em></figcaption></figure><h4>Updating the script files</h4><p>In the script folder, open import.json and replace it with the following data:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c920e6a0cfa85d74d7f799f059854944/href">https://medium.com/media/c920e6a0cfa85d74d7f799f059854944/href</a></iframe><p>Next, open importScript.js, and update <em>addQuery</em> (l.10) to match the schema:</p><pre>const addQuery = `<br>  (<strong>$name: String!, $position: Int!</strong>) {<br>    <strong>createPokemon</strong>(<strong>name: $name, position: $position</strong>) {<br>      <strong>name,<br>      position</strong><br>    }<br>  }<br>`;</pre><p>In the same file, update the GraphQL query found in the importItems() function (l.20):</p><pre>async function importItems() {<br>  for (const item of items) {<br>    const result = await client.mutate(addQuery, {<strong> name : item.name, position: item.position</strong> });<br>    if (result.errors) {<br>      console.error(result.errors);<br>    } else {<br>      console.log(&#39;Created an item:&#39;, <strong>result.createPokemon</strong>);<br>    }<br>  }<br>}</pre><p>Finally, add the url to your own GraphQL endpoint in Lokka’s configuration (l.6):</p><pre>const client = new Lokka({<br>  transport: new Transport(&#39;<strong>&lt;YOUR-GRAPHQL-ENDPOINT&gt;</strong>&#39;)<br>});</pre><h4>Running the script</h4><p>In the command line, call npm run import. It will add every Pokémon to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*re2l1LCzTO1r4DHBseHW3A.gif" /></figure><p>Once it completes, all the data should be available in your backend.</p><h3>Usage with reindex</h3><p>I couldn’t find a way to connect to a Reindex endpoint with <a href="https://github.com/kadirahq/lokka">Lokka</a>, so I made a slightly different version of the script for compatibility. It uses <a href="https://github.com/reindexio/reindex-js">reindex-js</a> instead, and the default query is adapted to match a Relay style GraphQL request.</p><p>To run it, follow the same steps shown above, but this time with the importScriptReindex.js file. Run it with npm run import-reindex.</p><p>You can find the complete script on github:</p><p><a href="https://github.com/thedgbrt/graphql-importer">thedgbrt/graphql-importer</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b9f2feccc2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/master-react-native/importing-data-via-a-graphql-endpoint-6b9f2feccc2c">Importing data via a GraphQL endpoint</a> was originally published in <a href="https://medium.com/master-react-native">Master React Native</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>