<?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>Forem: marella hemanth</title>
    <description>The latest articles on Forem by marella hemanth (@hemanth_9988).</description>
    <link>https://forem.com/hemanth_9988</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%2F2457721%2Fd1381971-bb12-437b-bcc4-ab0e9441b13a.png</url>
      <title>Forem: marella hemanth</title>
      <link>https://forem.com/hemanth_9988</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hemanth_9988"/>
    <language>en</language>
    <item>
      <title>From REST to GraphQL: My First Impressions and Setup Experience</title>
      <dc:creator>marella hemanth</dc:creator>
      <pubDate>Tue, 27 May 2025 06:25:39 +0000</pubDate>
      <link>https://forem.com/hemanth_9988/from-rest-to-graphql-my-first-impressions-and-setup-experience-2k2l</link>
      <guid>https://forem.com/hemanth_9988/from-rest-to-graphql-my-first-impressions-and-setup-experience-2k2l</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzbuxp52vub87pz4awz7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzbuxp52vub87pz4awz7.png" alt="Image description" width="380" height="574"&gt;&lt;/a&gt;&lt;br&gt;
Recently, I started exploring GraphQL while working on my MERN stack project. I learnt this through some youtube videos and some&lt;br&gt;
other sources.&lt;br&gt;
&lt;a href="https://graphql.org/" rel="noopener noreferrer"&gt;https://graphql.org/&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What is GraphQL
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.It is created by Facebook and released public in 2015&lt;/li&gt;
&lt;li&gt;GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.&lt;/li&gt;
&lt;li&gt;It's like REST, but you only ask for the data you need.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Ask for what you need,get exactly that&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsq9mf5hfdi21o16r45qf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsq9mf5hfdi21o16r45qf.jpeg" alt="Image description" width="745" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;GraphQL queries access not just the properties of one resource but also smoothly follow references between them. &lt;/li&gt;
&lt;li&gt;While typical REST APIs require loading from multiple URLs, GraphQL APIs get all the data your app needs in a single request.&lt;/li&gt;
&lt;li&gt;Apps using GraphQL can be quick even on slow mobile network connections.&lt;/li&gt;
&lt;li&gt;Add new fields and types to your GraphQL API without impacting existing queries.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lets Explore some Core concepts &lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Schema&lt;/strong&gt; : It is a Blueprint of your GraphQL Api.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjd0diwpqjbmj0sipj95z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjd0diwpqjbmj0sipj95z.png" alt="Image description" width="724" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Queries&lt;/strong&gt; : used to fetch Data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnx70sxpslnyraphnva0k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnx70sxpslnyraphnva0k.png" alt="Image description" width="724" height="568"&gt;&lt;/a&gt;&lt;br&gt;
3.&lt;strong&gt;Mutations&lt;/strong&gt; : Used to modify data (Create, Update, Delete).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rdhdql0tnmf732ny6v1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rdhdql0tnmf732ny6v1.png" alt="Image description" width="724" height="606"&gt;&lt;/a&gt;&lt;br&gt;
4.&lt;strong&gt;Resolvers&lt;/strong&gt; : Functions that handle the logic for queries/mutations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe84ai539s9lf9ytgvaab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe84ai539s9lf9ytgvaab.png" alt="Image description" width="690" height="872"&gt;&lt;/a&gt;&lt;br&gt;
5.&lt;strong&gt;Types&lt;/strong&gt; : Scalar: String, Int, Boolean, ID, Float&lt;/p&gt;

&lt;p&gt;Object: Custom data types like Book, User, etc.&lt;/p&gt;

&lt;p&gt;Input: Used for sending objects in mutations.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Lets see the setup for the GraphQL through VScode.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvibw1v8qqrumsc0br9z3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvibw1v8qqrumsc0br9z3.png" alt="Image description" width="724" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;buildSchema(...)&lt;/strong&gt;: Defines a GraphQL schema using a special string format.&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;type Query&lt;/strong&gt;: Every GraphQL schema must have a Query type — it’s the entry point for read operations.&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;hello&lt;/strong&gt;: String: You define a field called hello that returns a string.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00jl20ruz1aasig9i1kc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00jl20ruz1aasig9i1kc.png" alt="Image description" width="800" height="763"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.Line 14 is your resolver function.It maps to the field defined in your schema (hello).&lt;/p&gt;

&lt;p&gt;5.When the client runs { hello }, this function runs and returns 'Hello Naresh IT!'.&lt;/p&gt;

&lt;p&gt;6.Here comes the actual GraphQl Middleware&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;app.use('/graphql', ...)&lt;/strong&gt;: Connects the GraphQL middleware to the /graphql route.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;schema&lt;/strong&gt;: It Passes the schema you defined.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;rootValue&lt;/strong&gt;: The resolver functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;graphiql&lt;/strong&gt;: true: Enables the GraphiQL UI, a browser IDE where you can test your GraphQL queries.&lt;/p&gt;

&lt;p&gt;Now Based on above Code to Run This Query open browser and run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  hello
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you'll get&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
{
  "data":{
      "hello":"Hello Naresh IT!"
    }
}   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, in short GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.I hope this makes your concept clear and understandable.&lt;/p&gt;

&lt;p&gt;Official Website : &lt;a href="https://graphql.org/" rel="noopener noreferrer"&gt;https://graphql.org/&lt;/a&gt;&lt;br&gt;
How to use Playground : &lt;a href="https://graphqlzero.almansi.me/" rel="noopener noreferrer"&gt;https://graphqlzero.almansi.me/&lt;/a&gt;&lt;br&gt;
GraphQL Playground: &lt;a href="https://graphqlzero.almansi.me/api" rel="noopener noreferrer"&gt;https://graphqlzero.almansi.me/api&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you later with more intresting topics 👋&lt;/p&gt;

</description>
      <category>graphql</category>
      <category>webdev</category>
      <category>api</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Javascript Notes</title>
      <dc:creator>marella hemanth</dc:creator>
      <pubDate>Sat, 25 Jan 2025 13:53:17 +0000</pubDate>
      <link>https://forem.com/hemanth_9988/javascript-notes-5hg2</link>
      <guid>https://forem.com/hemanth_9988/javascript-notes-5hg2</guid>
      <description>&lt;p&gt;All Concepts from beginner to advanced might be helpful for Interviews&lt;a href="https://pdf.ac/F4CaF" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pdf.ac/F4CaF" rel="noopener noreferrer"&gt;https://pdf.ac/F4CaF&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>My Portfolio</title>
      <dc:creator>marella hemanth</dc:creator>
      <pubDate>Fri, 03 Jan 2025 14:49:44 +0000</pubDate>
      <link>https://forem.com/hemanth_9988/my-portfolio-5fn0</link>
      <guid>https://forem.com/hemanth_9988/my-portfolio-5fn0</guid>
      <description>&lt;p&gt;Hola Guys i just finished my portfolio yet it may not be responsive but can you suggest me any ideas to improve it further and take it to next level and if you have any sort of suggestions feel free to give me ,I'm a junior web developer only 😁.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdds8os1iop8u8dxa3mn1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdds8os1iop8u8dxa3mn1.png" alt="Image description" width="800" height="1432"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>portfolio</category>
      <category>frontend</category>
      <category>webdev</category>
      <category>css</category>
    </item>
  </channel>
</rss>
