<?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: porgeet</title>
    <description>The latest articles on DEV Community by porgeet (@porgeet).</description>
    <link>https://dev.to/porgeet</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%2F238253%2F940f5884-942b-4ac1-bd03-078d3bb1bee3.png</url>
      <title>DEV Community: porgeet</title>
      <link>https://dev.to/porgeet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/porgeet"/>
    <language>en</language>
    <item>
      <title>GraphQL Server Creation - Codepen With Notes</title>
      <dc:creator>porgeet</dc:creator>
      <pubDate>Sun, 06 Oct 2019 13:03:46 +0000</pubDate>
      <link>https://dev.to/porgeet/graphql-server-creation-codepen-with-notes-4lmc</link>
      <guid>https://dev.to/porgeet/graphql-server-creation-codepen-with-notes-4lmc</guid>
      <description>&lt;p&gt;Hey all 👋&lt;/p&gt;

&lt;p&gt;I've been learning javascript for a while now and still consider myself a beginner. Part of my learning process has involved going back through old projects from tutorials and trying to figure out what I did.&lt;/p&gt;

&lt;p&gt;So I'm creating a public codepen with annotated code for myself and anyone who might benefit from it.&lt;/p&gt;

&lt;p&gt;This pen in particular will deal with &lt;strong&gt;creating a GraphQL server using ExpressJS.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/porgeet/pen/dyyyevm"&gt;https://codepen.io/porgeet/pen/dyyyevm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy, &lt;br&gt;
I hope this is helpful&lt;/p&gt;

&lt;p&gt;&lt;em&gt;PS - I will be updating this pen the more I understand about GraphQL&lt;/em&gt;&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>express</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Help With Interrelated Data Files for MongoDB?</title>
      <dc:creator>porgeet</dc:creator>
      <pubDate>Sun, 29 Sep 2019 16:11:21 +0000</pubDate>
      <link>https://dev.to/porgeet/interrelated-data-files-for-mongodb-3l6n</link>
      <guid>https://dev.to/porgeet/interrelated-data-files-for-mongodb-3l6n</guid>
      <description>&lt;p&gt;Hi all 👋&lt;/p&gt;

&lt;p&gt;I have been wrestling with this issue for ages and getting slightly closer, but the progress is painfully slow. Hopefully someone can help me... 🙏&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can I write interrelated data populate a mongodb database?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's an example, I have a series of JavaScript files:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weapon File&lt;/strong&gt; - (to go to weapon collection)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sword&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;damage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;damageType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ObjectID&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Damage Type File&lt;/strong&gt; (to go to damage type collection)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Slicing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;weapons&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ObjectID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ObjectID&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Where &lt;strong&gt;ObjectID&lt;/strong&gt; would refer to the &lt;strong&gt;_id&lt;/strong&gt; of the interrelated data. In this case a weapon would have a damageType and a Damage Type would have a series of weapons.&lt;/p&gt;

&lt;p&gt;How would I write those javascript files since the &lt;strong&gt;_id&lt;/strong&gt; field is generated by mongodb?&lt;/p&gt;

&lt;p&gt;Any help would be greatly appreciated 😄&lt;/p&gt;

&lt;p&gt;Cheers&lt;br&gt;
Pete&lt;/p&gt;

</description>
      <category>help</category>
      <category>graphql</category>
      <category>mongodb</category>
    </item>
  </channel>
</rss>
