<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abraham A. Agung</title>
    <description>The latest articles on DEV Community by Abraham A. Agung (@padunk).</description>
    <link>https://dev.to/padunk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F166091%2Fefc35e13-c20a-49da-adfe-630b009620f5.jpeg</url>
      <title>DEV Community: Abraham A. Agung</title>
      <link>https://dev.to/padunk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/padunk"/>
    <language>en</language>
    <item>
      <title>Learn GROQ Interactively</title>
      <dc:creator>Abraham A. Agung</dc:creator>
      <pubDate>Fri, 16 Apr 2021 03:30:10 +0000</pubDate>
      <link>https://dev.to/padunk/learn-groq-interactively-452p</link>
      <guid>https://dev.to/padunk/learn-groq-interactively-452p</guid>
      <description>&lt;h1&gt;
  
  
  What is GROQ?
&lt;/h1&gt;

&lt;p&gt;GROQ is Graph Relational Object Queries. Created by &lt;a href="https://twitter.com/purefiction"&gt;Alexander Staubo&lt;/a&gt; and &lt;a href="https://twitter.com/svale"&gt;Simen Svale Skogsgrud&lt;/a&gt; Additional works by &lt;a href="https://twitter.com/erikgrinaker"&gt;Erik Grinaker&lt;/a&gt; and &lt;a href="https://twitter.com/judofyr"&gt;Magnus Holm&lt;/a&gt;. If you familiar with &lt;a href="https://sanity.io"&gt;Sanity.io&lt;/a&gt; CMS then GROQ is not a stranger for you.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Learn GROQ?
&lt;/h1&gt;

&lt;p&gt;You can use Groq to query JSON data from your favorite API with ease. Meaning querying data is much fun with GROQ, where you can query complex data with concise code. You don't need to modify the raw data using multiple and / or complex JS functions later like &lt;code&gt;reducer&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Building Process
&lt;/h1&gt;

&lt;p&gt;I built this project based on Magnus Holm blog in &lt;a href="https://css-tricks.com/query-json-documents-in-the-terminal-with-groq/"&gt;CSS-Tricks&lt;/a&gt;, and inspired by &lt;a href="https://twitter.com/swyx"&gt;Swyx&lt;/a&gt; old project GraphQL of Thrones and &lt;a href="https://groq.dev"&gt;GROQ Arcade&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The project is built with &lt;a href="https://reactjs.org"&gt;React&lt;/a&gt;, &lt;a href="https://chakra-ui.com"&gt;ChakraUI&lt;/a&gt; for the styling, &lt;a href="https://codemirror.net/6/"&gt;Codemirror6&lt;/a&gt; for the editor and &lt;a href="https://vitejs.dev"&gt;Vite&lt;/a&gt; to wrap it up.&lt;/p&gt;

&lt;p&gt;The process is quite simple and with Vite, building project like this is really fast and enjoyable, while off course there is always some quirks I found with it, but overall it was a nice experience.&lt;/p&gt;

&lt;p&gt;The hardest problem I found building this is configuring Codemirror. Before I using Codemirror6, I use Codemirror5 and try couple of &lt;em&gt;Codemirror-react-wrapper&lt;/em&gt; and it had some problems with Vite.&lt;/p&gt;

&lt;p&gt;All the lessons is create with markdown file and the data is in JSON file. Vite and Rollup plugin make it easy to get both of those files and read it in React component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Head to &lt;a href="https://groq-of-thrones.netlify.app"&gt;GROQ of Thrones&lt;/a&gt; to learn more.
&lt;/h2&gt;

&lt;p&gt;Source code is on &lt;a href="https://github.com/padunk/groq-of-thrones"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>sanity</category>
      <category>cms</category>
      <category>groq</category>
    </item>
  </channel>
</rss>
