<?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: Ro</title>
    <description>The latest articles on DEV Community by Ro (@iamrosalp).</description>
    <link>https://dev.to/iamrosalp</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%2F736873%2F16a01478-4cbc-4190-9d5c-ee0c9b19fa1a.png</url>
      <title>DEV Community: Ro</title>
      <link>https://dev.to/iamrosalp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamrosalp"/>
    <language>en</language>
    <item>
      <title>How to Create a Weather App in 5 mins</title>
      <dc:creator>Ro</dc:creator>
      <pubDate>Thu, 28 Oct 2021 19:14:32 +0000</pubDate>
      <link>https://dev.to/iamrosalp/how-to-create-a-weather-app-in-5-mins-27f3</link>
      <guid>https://dev.to/iamrosalp/how-to-create-a-weather-app-in-5-mins-27f3</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Weather is something that greatly affects our life. Wherever we are if we know what is coming like snow or rain, we can make inform decisions. Undoubtedly, people find weather forecasting helpful to know about the weather conditions which explains why the need for weather app is growing. Weather applications make sure that users are informed to be prepared for the weather conditions.&lt;/p&gt;

&lt;p&gt;So if you're planning to create you own weather application you're in the right place. By the end of this article, you’d have learned how to build a Weather App using Appsmith. We’re going learn the following concepts-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connecting to the GraphQL API&lt;/li&gt;
&lt;li&gt;Writing queries to fetch data from API&lt;/li&gt;
&lt;li&gt;Binding query data to widgets&lt;/li&gt;
&lt;li&gt;Writing Javascript in Appsmith&lt;/li&gt;
&lt;li&gt;Sharing your application and managing permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you’ve got a good overview of what we’re going to be building, so let’s get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why to use Appsmith
&lt;/h2&gt;

&lt;p&gt;Coding a weather app is difficult and time consuming. To make our development easier and faster we'll be using Appsmith.&lt;/p&gt;

&lt;p&gt;Appsmith is an open-source platform that lets you create powerful apps, admin panels, dashboards quickly using a simple drag and drop interface. You can also connect your app to various Datasources like Firestore, REST APIs, MySQL, Postgres, MongoDB and many more.&lt;/p&gt;

&lt;p&gt;So now head over to appsmith.com and sign in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the Application
&lt;/h2&gt;

&lt;p&gt;We're going to build a simple weather app so lets start creating our app. We want our weather app to display details like weather description, wind speed, temperature, weather icon and many more.&lt;/p&gt;

&lt;p&gt;For this application we're using GraphQL weather API. You can checkout the api &lt;a href="https://graphql-weather-api.herokuapp.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Its free and gives accurate weather conditions.&lt;/p&gt;

&lt;p&gt;We’re going to be creating a new application, so click on the create new button. This will redirect you to our newly created application. Rename the application as &lt;strong&gt;Weather App&lt;/strong&gt; by simply double-clicking on the existing name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building UI and Accessing Widget Properties
&lt;/h2&gt;

&lt;p&gt;To build our beautiful UI we'll be using a Container widget, so that we can group our other widgets inside this.&lt;/p&gt;

&lt;p&gt;We want a Image Widget and eight Text Widgets. Click on the + icon next to the Widgets from entity explorer. You’ll find a list of UI widgets that you can use to build the applications. Drag and drop a Text widget inside the container and add their associated names like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temperature&lt;/li&gt;
&lt;li&gt;City Name&lt;/li&gt;
&lt;li&gt;Humidity&lt;/li&gt;
&lt;li&gt;Min Temp&lt;/li&gt;
&lt;li&gt;Max Temp&lt;/li&gt;
&lt;li&gt;Wind Speed&lt;/li&gt;
&lt;li&gt;Description&lt;/li&gt;
&lt;li&gt;Visibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To make our UI look great we'll set the styling properties of Text Widgets as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cell Background Color: #2E3D49&lt;/li&gt;
&lt;li&gt;Text Color: #FFF&lt;/li&gt;
&lt;li&gt;Border Color: #FFF&lt;/li&gt;
&lt;li&gt;Text Size: #Heading2&lt;/li&gt;
&lt;li&gt;Text Align: Center&lt;/li&gt;
&lt;li&gt;Border Width: 1px&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So our basic UI is done, now lets create our first API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting with GraphQL
&lt;/h2&gt;

&lt;p&gt;To establish a new connection, follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make a connection to API by clicking the plus icon under API section or you can even use CURL import.&lt;/li&gt;
&lt;li&gt;Lets rename our query to FetchWeather.&lt;/li&gt;
&lt;li&gt;We’ll write a POST request and use GraphQL query to list down all weather details.&lt;/li&gt;
&lt;li&gt;Next, paste the URL of GraphQL weather API that I mentioned earlier.&lt;/li&gt;
&lt;li&gt;We’ll have to set headers in order to access the API. Set content-type to application/json.&lt;/li&gt;
&lt;li&gt;Now, we’ll have to write a GraphQL query in the request body to list all the database games. This will require an object with query as key and the GraphQL query value associated with it to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Copy-paste the below code snippet in request body-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
JSON.stringify({
    variables: {
            city: cityName.text
    },
    query: `
        query ($city: String!){
            getCityByName(name: $city){
   name
   country
   coord {
     lon
     lat
   }
   weather {
     summary {
       title
       description
       icon
     }
     temperature {
       actual
       min
       max
     }
     wind {
       speed
       deg
     }
     clouds {
       all
       visibility
       humidity
     }
     timestamp
   }
 }
        }
    `
})
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we have to give the city name in the query to fetch weather info. We are taking the city name from our app UI and accessing it here using &lt;em&gt;cityName.text&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now, hit the Run button to run the query. You should see a the weather details in a JSON format in the response tab.&lt;br&gt;
&lt;a href="https://media.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%2Fywy495f9yhkt8pk42gc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fywy495f9yhkt8pk42gc7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And we're done fetching weather details. Lets head to the next section to complete our app.&lt;/p&gt;
&lt;h2&gt;
  
  
  Completing onClick action for Submit Button
&lt;/h2&gt;

&lt;p&gt;Now, we'll see how to load data from API to our main page app after click the submit button.&lt;/p&gt;

&lt;p&gt;Inside the property pane of Submit Button, we’ll find a onClick Action, and here we’ll have to bind the data from FetchWeather API. Use the moustache syntax and add the below code snippet-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{FetchWeather.run()}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this the data is fetched lets bind this data with our main page app. We have eight text widgets as follows-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temperature&lt;/li&gt;
&lt;li&gt;City Name&lt;/li&gt;
&lt;li&gt;Humidity&lt;/li&gt;
&lt;li&gt;Min Temp&lt;/li&gt;
&lt;li&gt;Max Temp&lt;/li&gt;
&lt;li&gt;Wind Speed&lt;/li&gt;
&lt;li&gt;Description&lt;/li&gt;
&lt;li&gt;Visibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now head to the property pane of Humidity Text widget and set the text property to the following-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Humidity
{{FetchWeather.data.data.getCityByName.weather.clouds.humidity}}%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Below is the screenshot of how the response looks like:&lt;br&gt;
&lt;a href="https://media.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%2F6wt3eydc0ywfz9g7egsc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F6wt3eydc0ywfz9g7egsc.png" alt="humidity"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great, we can now see our data from the GraphQL API on our Text widget; similarly, let’s set the Text property of other text widgets to show the contents from the API:&lt;/p&gt;

&lt;p&gt;Wind speed text widget set the Text property to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Wind Speed
{{FetchWeather.data.data.getCityByName.weather.wind.speed}} mps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Min Temp text widget set the Text property to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Min Temp
{{Math.round(FetchWeather.data.data.getCityByName.weather.temperature.min - 273.15)}} °C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Temperature fetched from API is in Kelvin to convert it into degree celsius we're subtracting the value from 273.15 and using Math.round() to round the value.&lt;/p&gt;

&lt;p&gt;Max Temp text widget set the Text property to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Max Temp
{{Math.round(FetchWeather.data.data.getCityByName.weather.temperature.max - 273.15)}} °C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly setting other text values.&lt;/p&gt;

&lt;p&gt;In the API we also get a weather icon, but these are codes like 50d or 200 and we cannot use them to display image. So set the image property with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{ `http://openweathermap.org/img/w/`+`${FetchWeather.data.data.getCityByName.weather.summary.icon}`+`.png`
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we're concatenating openweather's url with our api code &lt;strong&gt;"FetchWeather.data.data.getCityByName.weather.summary.icon"&lt;/strong&gt; this will give us image of the corresponding code. Below image shows response-&lt;br&gt;
&lt;a href="https://media.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%2F1by8eyvyqmfyobxyh7gb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F1by8eyvyqmfyobxyh7gb.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Complete Weather App
&lt;/h2&gt;

&lt;p&gt;Here's how our completed App looks like-&lt;br&gt;
&lt;a href="https://media.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%2Fe0iexsu7f7om7ldxzkah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fe0iexsu7f7om7ldxzkah.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Deploy your application and share it with friends. And thats it, we're done!&lt;/p&gt;

&lt;p&gt;In this tutorial we learn how to connect our app to a GraphQL API and how to create and read data. We also learned to use Image, Text widget and how to customize them for our purposes.&lt;/p&gt;

&lt;p&gt;If you found this tutorial helpful, checkout their &lt;a href="https://github.com/appsmithorg/awesome-appsmith" rel="noopener noreferrer"&gt;Appsmith Github&lt;/a&gt; page for more such blogs.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>graphql</category>
    </item>
    <item>
      <title>Build a Cryptocurrency Price Tracker - Appsmith</title>
      <dc:creator>Ro</dc:creator>
      <pubDate>Thu, 28 Oct 2021 08:06:36 +0000</pubDate>
      <link>https://dev.to/iamrosalp/build-a-cryptocurrency-price-tracker-appsmith-5fd9</link>
      <guid>https://dev.to/iamrosalp/build-a-cryptocurrency-price-tracker-appsmith-5fd9</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Building Cryptocurrency Price Tracker&lt;/li&gt;
&lt;li&gt;What you'll learn&lt;/li&gt;
&lt;li&gt;Building main page UI&lt;/li&gt;
&lt;li&gt;Fetching data from API&lt;/li&gt;
&lt;li&gt;Binding Data to Widgets&lt;/li&gt;
&lt;li&gt;Completing onRowSelected action&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Building Cryptocurrency Price Tracker
&lt;/h2&gt;

&lt;p&gt;As the digital currency industry is increasing with newcomers joining every day, several companies are creating unique tools to help traders obtain decent returns. The best Cryptocurrency Price Tracker can help traders to improve trading and take it to the next level. Coding such a tracker feels difficult, but Appsmith makes it easy.&lt;/p&gt;

&lt;p&gt;Appsmith is a low code platform that makes creating Admin Panels, Dashboards and more 10x faster. This tutorial assumes you have basic knowledge of Appsmith, if you're new checkout their documentation page &lt;a href="https://docs.appsmith.com/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you will learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Building two page application with Appsmith.&lt;/li&gt;
&lt;li&gt;Using API as Datasources.&lt;/li&gt;
&lt;li&gt;Connecting data fetched from API to application widgets.&lt;/li&gt;
&lt;li&gt;How to navigate to next page on Table row select.&lt;/li&gt;
&lt;li&gt;How to use Table, Image and other widgets.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Building main page UI
&lt;/h2&gt;

&lt;p&gt;Now let's start with building our main page application. This page will contain a table that displays Market Rank, Current Price, Market Cap and other details. On selecting a row the user should be redirected to a new page and give some more details of the selected digital currency.&lt;/p&gt;

&lt;p&gt;If you are new to Appsmith, its free to use so go ahead and create your account. After you log in you might be redirected to Appsmith Dashboard.&lt;/p&gt;

&lt;p&gt;Follow the below steps to create UI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on &lt;strong&gt;Create New&lt;/strong&gt; button on the right hand side. This will redirect to our newly created app.&lt;/li&gt;
&lt;li&gt;Our app now has a default name as &lt;strong&gt;Untitled Application 1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Rename the app as &lt;strong&gt;Cryptocurrency Price Tracker&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;On the left hand side menu under Widgets section, drag and drop the Table widget. We'll use this Table to show all details about each digital currency. The Table will have some default values, go into the property pane of Table and delete the default values. Later we'll load data from API.&lt;/li&gt;
&lt;li&gt;To give title to our app use Text widget and rename the Label as &lt;strong&gt;Today's Cryptocurrency Prices by Market Cap&lt;/strong&gt;. You can resize the Text widget or change its text color as per your choice. You can see how our Page1 looks in the below image-
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--199gr4gE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0j8x25aqoqoua1jossm.png" alt="crypto-page1-ui" width="880" height="528"&gt;
&lt;/li&gt;
&lt;li&gt;On the left sidebar click on &lt;strong&gt;+ icon&lt;/strong&gt; next to Pages section. This will create new page that we'll navigate to whenever a row is clicked on the Table.&lt;/li&gt;
&lt;li&gt;This page will have default name as &lt;strong&gt;Page2&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Drag and drop a &lt;strong&gt;Container Widget&lt;/strong&gt; on the canvas of Page2. Inside this container we'll create one Image widget and 8 Text fields like Market Rank, Mkt cap and other details. Rename Text fields as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coin Price&lt;/li&gt;
&lt;li&gt;Market Cap&lt;/li&gt;
&lt;li&gt;24h Low /24h High&lt;/li&gt;
&lt;li&gt;Trading Volume&lt;/li&gt;
&lt;li&gt;Market Cap Rank&lt;/li&gt;
&lt;li&gt;All-Time High&lt;/li&gt;
&lt;li&gt;All-Time Low&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this we are done building UI for both pages. &lt;/p&gt;

&lt;h2&gt;
  
  
  Fetching data from API
&lt;/h2&gt;

&lt;p&gt;In this section, we'll learn to integrate API with our application. The API used in this app to get realtime and accurate data is taken from &lt;a href="https://www.coingecko.com/en"&gt;CoinGecko&lt;/a&gt;. CoinGecko provides analysis of crypto market. The API is publicly available, reliable and provides data for over 1,000+ coins such as Bitcoin, Ethereum and more.&lt;/p&gt;

&lt;p&gt;So now lets see how to connect API to Appsmith.&lt;/p&gt;

&lt;p&gt;At the left hand side menu, click on the &lt;strong&gt;+ icon&lt;/strong&gt; besides Datasources. This will show all the Datasources that Appsmith can connect to, you have to click on the &lt;strong&gt;CURL Import&lt;/strong&gt; option under API section. Copy paste the CURL import below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -X 'GET' \
 'https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&amp;amp;order=market_cap_desc&amp;amp;per_page=100&amp;amp;page=1&amp;amp;sparkline=false&amp;amp;price_change_percentage=1h%2C24h%2C7d' \
 -H 'accept: application/json'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After importing you'll see the Headers of the GET request already set. The CURL import sets the Headers for us. The GET request has a default name as "Api1", let us rename this as &lt;strong&gt;Fetch&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now click on the Run Button and this will show all the data in JSON format in the Response Section. You can see the response in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gkc_gAq5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hlmkr1qlev2lejbl1j59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gkc_gAq5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hlmkr1qlev2lejbl1j59.png" alt="crypto-fetch-api" width="880" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And its done, you see how easy it is to integrate Api with Appsmith.&lt;/p&gt;

&lt;h2&gt;
  
  
  Binding Data to Widgets
&lt;/h2&gt;

&lt;p&gt;Now that we are done fetching data, we have to connect it with our Table widget. Under the Table property pane you can see Table details, it contains default data so you have to delete that and copy paste below code snippet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
    {{Fetch.data.map(val =&amp;gt; ({
        "Rank": val.market_rank,
        "Symbol":val.symbol,
        "Image":val.image,
        "Coin":val.name,
        "1h":val.price_change_percentage_1h_in_currency,
        "24h":val.price_change_percentage_24h_in_currency,
        "7d":val.price_change_percentage_7d_in_currency,
        "Mkt Cap":val.market_cap,
    }))}}
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will now show all details in our Table widget. You can see how our Page1 looks in the below image.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VMDb5M5D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gedr30r70mu0z45j73t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VMDb5M5D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gedr30r70mu0z45j73t.png" alt="Page1" width="880" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Awesome! our Main page is complete but we want to navigate our user to Page2 whenever a row on the Table is clicked. Lets see how to do this in the next section. &lt;/p&gt;
&lt;h2&gt;
  
  
  Completing onRowSelected action
&lt;/h2&gt;

&lt;p&gt;In this section we'll learn how to navigate to next Page when a Table row is clicked. We'll also pass details from our Page1 Table to Page2.&lt;/p&gt;

&lt;p&gt;When you go into the property pane of Table, you'll see list of Actions. Choose &lt;strong&gt;navigateTo()&lt;/strong&gt; option under &lt;strong&gt;onRowSelected&lt;/strong&gt; Action. Or you can even choose to write Javascript code and copy-paste below snippet-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{navigateTo('Page2',Table1.selectedRow)}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;navigateTo method takes 2 arguments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First where to redirect(like Page2, Page3...)&lt;/li&gt;
&lt;li&gt;Next, queryparams that will provide info on Page2. Here we are passing the selected row's details to next page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now lets fill in the values in our Image and Text widgets-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Image&lt;/strong&gt; - appsmith.URL.queryParams.image&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coin Price&lt;/strong&gt; - appsmith.URL.queryParams.image&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Market Cap&lt;/strong&gt; - appsmith.URL.queryParams.image&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;24h Low / 24h High&lt;/strong&gt; - appsmith.URL.queryParams.low_24h / appsmith.URL.queryParams.high_24h&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trading Volume&lt;/strong&gt; - appsmith.URL.queryParams.total_volume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Market Cap Rank&lt;/strong&gt; - appsmith.URL.queryParams.market_cap_rank&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All-Time High&lt;/strong&gt; - appsmith.URL.queryParams.ath&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All-Time Low&lt;/strong&gt; - appsmith.URL.queryParams.atl&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;appsmith.URL.queryParams&lt;/em&gt; gives the value that we passed with navigateTo() method. With this our complete Page2 looks like this-&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DqRBJ9Wy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qqcyf2gpvfa2c8ol9xu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DqRBJ9Wy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qqcyf2gpvfa2c8ol9xu.png" alt="Page2-ui" width="880" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And we're done! here is how the complete application looks like-&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7y2cSxme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqaqvvr2yfbofa4jv61o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7y2cSxme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zqaqvvr2yfbofa4jv61o.png" alt="Final-app" width="880" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You've seen how easy it is to build a Cryptocurrency Price Tracker with Appsmith. So if you want to create a app and have zero coding knowledge consider creating it with Appsmith. I hope you learned something useful here. Now, it is your turn. Go ahead and create a application with Appsmith.&lt;/p&gt;

</description>
      <category>appsmith</category>
      <category>tutorial</category>
      <category>showdev</category>
      <category>github</category>
    </item>
    <item>
      <title>How to work with GraphQL on Appsmith</title>
      <dc:creator>Ro</dc:creator>
      <pubDate>Tue, 26 Oct 2021 17:20:39 +0000</pubDate>
      <link>https://dev.to/iamrosalp/how-to-work-with-graphql-on-appsmith-5ei</link>
      <guid>https://dev.to/iamrosalp/how-to-work-with-graphql-on-appsmith-5ei</guid>
      <description>&lt;h2&gt;
  
  
  Getting started with Appsmith
&lt;/h2&gt;

&lt;p&gt;Appsmith is a opensource framework that helps us build CRUD apps, Dashboards, Admin Panels and many more much faster. We can also connect to Datasources and APIs to create complex workflows. You can learn more about Appsmith &lt;a href="https://docs.appsmith.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building A Demo Application
&lt;/h2&gt;

&lt;p&gt;We will learn to integrate Appsmith with GraphQL and also build our demo application. I've created a book database, hosted it on Hasura and exported it as GraphQL API. Below is an image showing some of the attributes of the dataset.&lt;br&gt;
&lt;a href="https://media.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%2Fod2iamophp3eyvyz5ll0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fod2iamophp3eyvyz5ll0.png" alt="Hasura Console"&gt;&lt;/a&gt;&lt;br&gt;
In the above screenshot we can see I have executed a Graphql query in the Hasura console and the response consists of a list of books in a JSON format. Next, we’ll use Appsmith to utilise this database and build a Book Search App by writing different GraphQL queries.&lt;/p&gt;
&lt;h2&gt;
  
  
  Building a simple UI
&lt;/h2&gt;

&lt;p&gt;To start building our application we need to signup to Appsmith(it's free!). In this tutorial, we'll create a Book Search application. To do this, follow the below steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on the &lt;strong&gt;Create New&lt;/strong&gt; button under your organisation.This will redirect to the configuration page of the newly created app.&lt;/li&gt;
&lt;li&gt;Note that the app is created with a default name &lt;em&gt;Untitled Application 1&lt;/em&gt;. We'll rename it to &lt;strong&gt;Book Search App&lt;/strong&gt; by double-clicking on the default name.&lt;/li&gt;
&lt;li&gt;On the sidebar to the left side drag and drop the List widget on the canvas. This list will be displaying all the books that we'll fetch from database.&lt;/li&gt;
&lt;li&gt;Next add some Text widget on the List to display the book details. This Text widget has many styling properties like Text Color, Text Size etc. to choose from.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So our basic UI is done, now lets create our first API.&lt;/p&gt;
&lt;h2&gt;
  
  
  Connecting to the Database and Fetching Data to Appsmith
&lt;/h2&gt;

&lt;p&gt;To connect to our GraphQL backend server, follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On the sidebar to the left side click on the &lt;strong&gt;+&lt;/strong&gt; icon next to &lt;strong&gt;Datasources&lt;/strong&gt;. You’ll see a list of Datasources that Appsmith can connect to. Click on &lt;strong&gt;Create new API&lt;/strong&gt; under the &lt;strong&gt;APIs&lt;/strong&gt; section&lt;/li&gt;
&lt;li&gt;Now rename the API to &lt;strong&gt;FetchBooks&lt;/strong&gt;. We can use this query name in UI to access the query results.&lt;/li&gt;
&lt;li&gt;We'll create a &lt;strong&gt;POST request&lt;/strong&gt; to fetch all books from the database&lt;/li&gt;
&lt;li&gt;Next, enter the URL of your Graphql endpoint (e.g. &lt;a href="https://mock.hasura.app/v1/graphql" rel="noopener noreferrer"&gt;https://mock.hasura.app/v1/graphql&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Inorder to access the database we need to set &lt;strong&gt;content-type&lt;/strong&gt; and &lt;strong&gt;x-hasura-admin-secret&lt;/strong&gt; headers.&lt;/li&gt;
&lt;li&gt;In the request body we have to write Graphql query to list down all books from the database.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
JSON.stringify({
    variables: null,
    query: `
        query {
            book_list { Name, Author, Genre, Image }
        }
    `
})
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Click on the &lt;strong&gt;Run button&lt;/strong&gt; or hit &lt;strong&gt;cmd + enter&lt;/strong&gt; to execute a query. You'll see a list of books in JSON format in the Response tab.&lt;br&gt;
&lt;a href="https://media.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%2Frphq25jwkj3ms2gecsvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Frphq25jwkj3ms2gecsvt.png" alt="fetch-query"&gt;&lt;/a&gt;&lt;br&gt;
Lets connect this query to our UI and fetch all books to our List widget. Click on the List's property pane to update the data with the query results.Inside property pane, you'll find &lt;strong&gt;List Items&lt;/strong&gt; property. Use the moustache syntax and add the below code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{FetchBook.data.data.book_list}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will display our data in the form of a list.&lt;br&gt;
&lt;a href="https://media.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%2Fjuua7wr6puj9yyjxrbj0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fjuua7wr6puj9yyjxrbj0.png" alt="book-list"&gt;&lt;/a&gt;&lt;br&gt;
We now have our list of books fetched from Graphql endpoint and displayed on our UI. Next, we’ll create a form where we can add new books to the database.&lt;/p&gt;
&lt;h2&gt;
  
  
  Inserting new book to database from Appsmith
&lt;/h2&gt;

&lt;p&gt;In this section, we'll see how we can insert a new book from our UI to the database. For this we'll create a simple form on Appsmith.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Drag and drop a form widget on to the canvas. In this form widget, we'll add input widgets that accept necessary fields to add new book.&lt;/li&gt;
&lt;li&gt;Open property pane of input widgets and name the input fields so we can reference them in our Graphql query. Also select Data type for each input field according to the type of data to be stored in database. Below is how we’ll have to name the input widgets.

&lt;ul&gt;
&lt;li&gt;Name - nameInput&lt;/li&gt;
&lt;li&gt;Author - authorInput&lt;/li&gt;
&lt;li&gt;Image - imageInput&lt;/li&gt;
&lt;li&gt;Genre - genreInput&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below is how the form will look like.&lt;br&gt;
&lt;a href="https://media.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%2F0igni9ilnxt18hgfc8p1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F0igni9ilnxt18hgfc8p1.png" alt="insert-book-form"&gt;&lt;/a&gt;&lt;br&gt;
So now we have are UI ready; lets create API to add new book to database. Follow the same steps we did to create fetchBook API and create another POST request. Rename the API to &lt;strong&gt;InsertBook&lt;/strong&gt; and paste the below code snippet in the request body of Graphql query.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
JSON.stringify({
    variables: {
        book: {
            Name: nameInput.text,
            Author: authorInput.text,
            Image: imageInput.text,
            Genre: genreInput.text
        }
    },
    query: `
        mutation ($book: book_list_insert_input!) {
  insert_book_list_one(object: $book) {
    Name
    Author
    Image
    Genre
  }
}
    `
})
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Here we have an object with query key that holds the Graphql query and a variable key with all the variables that need to be posted to the database.&lt;/li&gt;
&lt;li&gt;To fetch the values from the input widgets, use the names of the input widgets and the &lt;strong&gt;.text&lt;/strong&gt; method is used to pick the text that's written in the input widgets. (e.g. nameInput.text)&lt;/li&gt;
&lt;li&gt;The insert_book_list_one in the mutation lets us add one book to the database.&lt;/li&gt;
&lt;li&gt;Now that our api is ready, lets connect this to our UI so that whenever the Submit button on form is clicked we can add a book.
&lt;img src="https://media.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%2Fq82nk2frpb9dha8tea1z.png" alt="onclick-insert"&gt;
As you can see in the above image, open the property pane of Submit button and set the onClick action with the code snippet below.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
    InsertBook.run(
      () =&amp;gt; FetchBook.run(),
      () =&amp;gt; showAlert('Error','error'))
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we're calling the InsertBook API using .run() method that takes two arguments. On successfully running the API we call FetchBook.run() to display the updated list of books and on error shows an alert message.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;onSuccess action - FetchBook.run()&lt;/li&gt;
&lt;li&gt;onError action - showAlert('Error','error')&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Awesome, now that we have our POST request ready, we can try adding a new book using the form we’ve created.&lt;/p&gt;

&lt;h2&gt;
  
  
  Updating the book details on database
&lt;/h2&gt;

&lt;p&gt;In this section, we'll learn how to update the book details from Appsmith and save the changes on database.&lt;br&gt;
For this we'll create a simple modal that will open whenever user selects a list item.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the property pane of List widget, set the &lt;strong&gt;onListItemClick&lt;/strong&gt; action to &lt;strong&gt;Open Modal&lt;/strong&gt; and then click on &lt;strong&gt;New Modal&lt;/strong&gt; to create a new modal.&lt;/li&gt;
&lt;li&gt;Drag and drop all necessary input widgets to display the Book Details. We have to name all input widgets and also provide the default text based on item that is selected.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name Input&lt;/strong&gt;: editName &amp;amp; Default Text: List1.selectedItem.Name&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Author Input&lt;/strong&gt;: editAuthor &amp;amp; Default Text: List1.selectedItem.Author&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Input&lt;/strong&gt;: editImage &amp;amp; Default Text: List1.selectedItem.Image&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Genre Input&lt;/strong&gt;: editGenre &amp;amp; Default Text: List1.selectedItem.Genre&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, whenever we made changes in the input widgets and hit update details button, the associated book details should be updated in the database. For this, let’s write a new update API that’ll help us update the values. Follow the same steps as fetchBook API and paste below code in body of Graphql query.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
JSON.stringify({
    variables: {
        book: {
            Name: editName.text,
            Author: editAuthor.text,
            Image: editImage.text,
            Genre: editGenre.text
        }
    },
    query: `mutation ($book: book_list_set_input) { update_book_list_by_pk(_set: $book, pk_columns: {Name:"${List1.selectedItem.Name}"}) { Name, Author, Image, Genre} }
    `})
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Here we have an object with query key that holds the Graphql query and a variable key with all the variables that need to be posted to the database.&lt;/li&gt;
&lt;li&gt;We use the &lt;strong&gt;.text&lt;/strong&gt; to fetch data from input widgets of modal.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;update_book_list_by_pk&lt;/strong&gt; in the mutation lets us update a book by providing primary key &lt;strong&gt;Name&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Lastly, for the Update Details button, set the onclick property to Call the EditBook API. We should now be able to update the book details by editing the necessary input widgets and clicking on the update button.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Paste the below code in onclick property of update button in modal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
    EditBook.run(() =&amp;gt; {
        FetchBook.run();
        closeModal('EditModal');
    })
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The closeModal('EditModal') method helps us to close the modal after successfully running the query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deleting a book on database from Appsmith
&lt;/h2&gt;

&lt;p&gt;For the delete option, let's add a new button and name it as Delete so that we see a new delete button on each List Item. Now let's go ahead and create a new Delete API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new API and name it as DeleteBook. This query method helps us delete a book in the database from Appsmith.&lt;/li&gt;
&lt;li&gt;Copy the same &lt;strong&gt;content-type&lt;/strong&gt; and &lt;strong&gt;x-hasura-admin-secret&lt;/strong&gt; headers to access the database on Hasura from the previous FetchBook API.&lt;/li&gt;
&lt;li&gt;Now we’ll have to write a GraphQL query inside the request body, paste the below code snippet inside the body:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
JSON.stringify({
    query: `mutation {delete_book_list_by_pk(Name: ${this.params.Name} ) { Author } }
    `})
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The query needs primary key Name to find the corresponding book and delete its entry from database.&lt;/li&gt;
&lt;li&gt;We have to take this primary key of the selected List Item from the UI and access it in the request body using &lt;strong&gt;this.params.Name&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;When the user clicks on the delete button we want to delete the book and then call the FetchBook API to update the List Items. For this, we have to add custom JS in the button's onclick property:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{
    DeleteBook.run(
      () =&amp;gt; FetchBook.run(),
      () =&amp;gt; {},
      {Name: `${List1.selectedItem.Name}`})
}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Each query object has a run function that is used to execute the query. This function takes three arguments separated by comas:

&lt;ul&gt;
&lt;li&gt;onSuccess functions - In this case, its FetchBook.run()&lt;/li&gt;
&lt;li&gt;onError function&lt;/li&gt;
&lt;li&gt;params object - {Name: &lt;code&gt;${List1.selectedItem.Name}&lt;/code&gt;}&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And we done with our application. Below is the image of the final application.&lt;br&gt;
&lt;a href="https://media.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%2Fsyh5gdp1suk6uvksek49.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fsyh5gdp1suk6uvksek49.png" alt="Final App"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So now you have seen how easy it is to create applications on Appsmith. In this how-to guide we have learned to create an application and connect it with Graphql, also to create, read, update, delete data. We have also seen how to work with widgets. I hope you enjoyed this how-to guide. For more such tutorials you can refer to &lt;a href="https://docs.appsmith.com/" rel="noopener noreferrer"&gt;Appsmith docs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>graphql</category>
      <category>appsmith</category>
    </item>
  </channel>
</rss>
