<?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: Saranya Jena</title>
    <description>The latest articles on DEV Community by Saranya Jena (@saranyajena).</description>
    <link>https://dev.to/saranyajena</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%2F435368%2Fc3228e42-7d6c-4400-bb99-f5f0a0653c85.jpeg</url>
      <title>DEV Community: Saranya Jena</title>
      <link>https://dev.to/saranyajena</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saranyajena"/>
    <language>en</language>
    <item>
      <title>Understanding User Management and Authentication in LitmusChaos</title>
      <dc:creator>Saranya Jena</dc:creator>
      <pubDate>Mon, 23 Aug 2021 16:05:04 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/understanding-user-management-and-authentication-in-litmuschaos-575o</link>
      <guid>https://dev.to/litmus-chaos/understanding-user-management-and-authentication-in-litmuschaos-575o</guid>
      <description>&lt;p&gt;In this post, I will be explaining how user management and authentication are done in &lt;a href="https://litmusdocs-beta.netlify.app/docs/introduction/what-is-litmus" rel="noopener noreferrer"&gt;LitmusChaos&lt;/a&gt;. LitmusChaos is a Cross-Cloud Chaos Orchestration framework for practicing chaos engineering in cloud-native environments.  &lt;/p&gt;

&lt;h2&gt;
  
  
  LitmusChaos 2.0 is out now!🚀
&lt;/h2&gt;

&lt;p&gt;LitmusChaos 2.0 provides a new way of chaos engineering performed by the users. LitmusChaos itself is composed of microservices. And we made sure that adding the features for 2.0 seamlessly integrates the additional microservices in conjunction with the existing one. It is completely backward compatible. No features are deprecated. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Highlights:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All features of Litmus 1.x&lt;/li&gt;
&lt;li&gt;Addition of Chaos Workflow creation&lt;/li&gt;
&lt;li&gt;User Management &amp;amp; Teaming&lt;/li&gt;
&lt;li&gt;Introduction of ChaosCenter (The central chaos management center)&lt;/li&gt;
&lt;li&gt;Monitoring and Observability&lt;/li&gt;
&lt;li&gt;Resilience Score Calculation&lt;/li&gt;
&lt;li&gt;Manage Workflows using GitOps, Custom Image Registry&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  User Roles and Accessibility
&lt;/h2&gt;

&lt;p&gt;First of all let me explain the different user level roles and their privileges. LitmusChaos also has project-level roles which come under the &lt;a href="https://dev.to/litmus-chaos/introducing-teaming-in-litmuschaos-to-ease-your-chaos-engineering-experience-5alo"&gt;teaming section&lt;/a&gt;. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Admin:&lt;/strong&gt; The admin user is created by default on the initial portal &lt;a href="https://litmusdocs-beta.netlify.app/docs/getting-started/installation" rel="noopener noreferrer"&gt;setup&lt;/a&gt; and can log into the portal using the credentials &lt;code&gt;admin/litmus&lt;/code&gt; once the server pods are up and running. The admin can access every feature with exclusive access to the &lt;code&gt;User-management&lt;/code&gt; feature for user creation and management. Admin users can also view the overall usage statistics of the portal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Non-Admins:&lt;/strong&gt; The non-admin users, created by the admin, have access to all the features except &lt;code&gt;User-management&lt;/code&gt; and &lt;code&gt;Usage statistics&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  User-management
&lt;/h3&gt;

&lt;p&gt;Admin can access the following features through the &lt;code&gt;User management&lt;/code&gt; section:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create a User:&lt;/strong&gt; Admin can create a user by assigning a unique username and password and other optional details like name email-id.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View Users list:&lt;/strong&gt; Once the user is created, it will be listed in the table along with other details such as current status(active or deactivated), name, username, email-id, date, and time of the user creation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activate/Deactivate users:&lt;/strong&gt; Admin can toggle the current status of the user. Once a particular user is deactivated he/she won't be able to access any APIs of the LitmusChaos but all the previous data will be stored, which can be accessed back once the user gets reactivated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Edit profile:&lt;/strong&gt; Here, Admin can reset the password of other users.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Authentication and Getting Started
&lt;/h3&gt;

&lt;p&gt;Once a user is created, the user will be able to login into the portal with non-admin privileges. In case a user forgets the credentials, he/she can contact the portal admin to reset the credentials.&lt;br&gt;
On successful authentication, the user will be redirected to &lt;code&gt;/getStarted&lt;/code&gt; route. For the initial login, users will be asked to change the password and use the updated password for subsequent logins. One can also skip the option to change the password. Users can update their password anytime through the &lt;code&gt;My Account&lt;/code&gt; section. In either case, a default project will be created for you under which you can do your chaos testing!&lt;/p&gt;

&lt;p&gt;Here's a short GIF explaining all the basic features of User-management:&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%2Fcszirn87nigozzlfdscm.gif" 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%2Fcszirn87nigozzlfdscm.gif" alt="ezgif.com-gif-maker (3)" width="760" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some noteworthy points
&lt;/h2&gt;

&lt;p&gt;I have noticed, people are often confused between the types of roles. There are two layers of privilege levels:&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%2Fxr93kg5v1qh3obznur1l.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%2Fxr93kg5v1qh3obznur1l.png" alt="UserPriviledges" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Portal Level:&lt;/strong&gt; This is the first layer of privilege levels where user roles are assigned during user creation. As of now, one who installs the LitmusChaos and logs in with &lt;code&gt;admin/litmus&lt;/code&gt; credentials is assigned the role &lt;code&gt;admin&lt;/code&gt;, and all other users created by admin are assigned the role &lt;code&gt;user&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project Level:&lt;/strong&gt; This is the second layer of the privilege level, where roles are assigned to the project members while sending an invitation. If you want to know more about Projects and Teaming, you can find it &lt;a href="https://dev.to/litmus-chaos/introducing-teaming-in-litmuschaos-to-ease-your-chaos-engineering-experience-5alo"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;That's all, folks. Thank you for reading it till the end. I hope you had a productive time learning about LitmusChaos, and we hope you are as excited as we are about the upcoming features/additions! &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Are you an SRE or a Kubernetes enthusiast? Does Chaos Engineering excite you?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Join Our Community On Slack For Detailed Discussion, Feedback &amp;amp; Regular Updates On Chaos Engineering For Kubernetes: &lt;a href="https://slack.litmuschaos.io" rel="noopener noreferrer"&gt;https://slack.litmuschaos.io&lt;/a&gt; (#litmus channel on the Kubernetes workspace)&lt;/p&gt;

&lt;p&gt;Check out the Litmus Chaos GitHub repo and do share your feedback: &lt;a href="https://github.com/litmuschaos/litmus/issues" rel="noopener noreferrer"&gt;https://github.com/litmuschaos/litmus/issues&lt;/a&gt;&lt;br&gt;
Submit a pull request if you identify any necessary changes.&lt;br&gt;
Show your ❤️ with a ⭐ on our Github. To learn more about Litmus, check out the Litmus &lt;a href="https://litmusdocs-beta.netlify.app/docs/introduction/what-is-litmus" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. Cheers✌🏼&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>sre</category>
      <category>litmuschaos</category>
      <category>chaosengineering</category>
    </item>
    <item>
      <title>Introducing Teaming in LitmusChaos to ease your Chaos Engineering experience</title>
      <dc:creator>Saranya Jena</dc:creator>
      <pubDate>Thu, 20 May 2021 10:27:34 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/introducing-teaming-in-litmuschaos-to-ease-your-chaos-engineering-experience-5alo</link>
      <guid>https://dev.to/litmus-chaos/introducing-teaming-in-litmuschaos-to-ease-your-chaos-engineering-experience-5alo</guid>
      <description>&lt;p&gt;This blog covers everything you need to know about the teaming feature provided by LitmusChaos for your Chaos Engineering needs.&lt;/p&gt;

&lt;p&gt;Litmus is a Cross-Cloud Chaos Orchestration framework for practicing chaos engineering in cloud-native environments. Litmus provides a chaos operator, a large set of chaos experiments on its &lt;a href="https://hub.litmuschaos.io/" rel="noopener noreferrer"&gt;hub&lt;/a&gt;, detailed &lt;a href="https://docs.litmuschaos.io/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;, and a friendly community. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why teaming?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"Teamwork is the ability to work together towards a common vision. The ability to direct individual accomplishments towards organizational objectives. It is the fuel that allows common people to attain uncommon results."&lt;br&gt;&lt;br&gt;
-Andrew Carnegie&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The quote from Andrew Carnegie probably answers the questions.&lt;/p&gt;

&lt;p&gt;You might be wondering how this feature alters your Chaos Engineering experience? Why does LitmusChaos emphasize teaming?&lt;br&gt;
Imagine being a firefighter and dealing with the fire alone. You don’t want to be alone in the chaos you created.&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%2Fhkwqoq8ycxvd51os0rxq.gif" 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%2Fhkwqoq8ycxvd51os0rxq.gif" alt="fire alarm" width="340" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are working on a chaos engineering project and want to share the details/analytics with someone, you don’t have to export the data every time and share it with everyone individually, instead, Litmus provides users with a teaming feature that allows users to invite other members to their project and participate in it so that they can get the real-time update about the project. &lt;/p&gt;

&lt;h2&gt;
  
  
  Litmus Chaos 2.0 Advanced Beta Out Now!🚀
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;LitmusChaos&lt;/a&gt; 2.0 Advanced Beta provides a whole new way to perform chaos engineering, apprehending some high-level features. It comes with a lot of new and enhanced features such as GitOps, for Chaos Engineering, Workflow Sequence Editing, Visualization of workflows, Chaos Interleaved dashboards, and many more. You can find a detailed list on the &lt;a href="https://github.com/litmuschaos/litmus/releases" rel="noopener noreferrer"&gt;release&lt;/a&gt; page. It also includes a brand new UI for teaming along with some additional features. We’ll be exploring all of its features including the different kinds of roles and their access levels. A member of a project can schedule, modify workflows and view the analytics based on the member’s role in the project. &lt;br&gt;
We’ll start with explaining the different roles of a user in a team briefly. There are three project roles in Litmus:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Owner:&lt;/strong&gt; One who created the project and owns it. Only the owner has permission to manage(invite or remove) the members in his/her project. The owner can schedule workflows, update workflows, delete workflows and view the analytics.&lt;br&gt;
&lt;strong&gt;Editor:&lt;/strong&gt; Members invited with editor role can do everything an owner can except for managing the members in the project&lt;br&gt;
&lt;strong&gt;Viewer:&lt;/strong&gt; Members having a viewer role can only view the analytics related to the workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Highlights
&lt;/h2&gt;

&lt;p&gt;Now let's take a deeper dive into the features, what all we can achieve with teaming. It comes with the following features:&lt;br&gt;
&lt;strong&gt;Choose role and send the invitation:&lt;/strong&gt; With this, you can select as many users you want, choose their roles individually and send the invitation at once! Once it is done successfully you can see the status of your invitation ( whether it is pending/accepted/declined or exited) along with all other necessary details in the &lt;code&gt;Invited&lt;/code&gt; tab. &lt;br&gt;
&lt;strong&gt;Edit invitation:&lt;/strong&gt; Now if you had a change of mind and you wanted to change the role, we got you! Just go to the &lt;code&gt;invited&lt;/code&gt; tab, change the role, and hit the &lt;code&gt;Resend&lt;/code&gt; button. You can also cancel the invitation by just clicking on the &lt;code&gt;Bin&lt;/code&gt; icon.&lt;br&gt;
&lt;strong&gt;Respond to the invitation:&lt;/strong&gt; Once the invitation is received, the user can take a look at details including the sender's name, role, and project name, then decide whether to accept or decline the invitation. &lt;br&gt;
&lt;strong&gt;Leave or View Project:&lt;/strong&gt; Once you are done with the project and don’t want to be a part of it anymore, you can go to the &lt;code&gt;Active&lt;/code&gt; tab, here you can either switch to a project you want to view or can leave it by just clicking on the &lt;code&gt;Leave Project&lt;/code&gt; button! &lt;br&gt;
&lt;strong&gt;Remove a Member:&lt;/strong&gt; If you are the project owner, you can also remove any member!&lt;/p&gt;

&lt;p&gt;Once you respond to the invitation or leave it afterwards, the status will automatically get updated in the sender's account. Here's a short GIF explaining all the basic features of teaming.&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%2Ft269ktqjs5oc2bx3rln1.gif" 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%2Ft269ktqjs5oc2bx3rln1.gif" alt="ezgif.com-gif-maker" width="600" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;That's all folks! Thank you for sticking around. We hope you had a productive time reading about Litmus and its teaming feature. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;This blog is also contributed by &lt;a href="https://www.linkedin.com/in/sarthak-jain-64896a167" rel="noopener noreferrer"&gt;Sarthak Jain&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Are you an &lt;a href="https://en.wikipedia.org/wiki/Site_reliability_engineering" rel="noopener noreferrer"&gt;SRE&lt;/a&gt; or a &lt;a href="https://kubernetes.io/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt; enthusiast? Does &lt;a href="https://en.wikipedia.org/wiki/Chaos_engineering" rel="noopener noreferrer"&gt;Chaos Engineering&lt;/a&gt; excite you? Want to chat with us, we are available in &lt;a href="https://app.slack.com/client/T09NY5SBT/CNXNB0ZTN" rel="noopener noreferrer"&gt;Kubernetes slack&lt;/a&gt; (#litmus channel on the Kubernetes workspace). &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/litmuschaos" rel="noopener noreferrer"&gt;
        litmuschaos
      &lt;/a&gt; / &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;
        litmus
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Litmus helps  SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub  (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;&lt;a href="https://litmuschaos.io/" rel="nofollow noopener noreferrer"&gt;LitmusChaos&lt;/a&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://avatars.githubusercontent.com/u/49853472?s=200&amp;amp;v=4"&gt;&lt;img alt="LitmusChaos" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F49853472%3Fs%3D200%26v%3D4" width="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Open Source Chaos Engineering Platform&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://slack.litmuschaos.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/48844a2a28b222b400e3fbeb358770903bdcb4db693ac67fae37db71869352f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d4a6f696e2d707572706c65" alt="Slack Channel"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master"&gt;&lt;img src="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master" alt="GitHub Workflow"&gt;&lt;/a&gt;
&lt;a href="https://hub.docker.com/r/litmuschaos/chaos-operator" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2a2ae2b0d21ae55811e5da33f40b76a4aa18cd37d027ab13c5f3a4b6230ef55b/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6c69746d75736368616f732f6368616f732d6f70657261746f722e737667" alt="Docker Pulls"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e87b930f5b0b40039776ad0d255d62735311c7d7228bb7615d7408161915c0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c69746d75736368616f732f6c69746d75733f7374796c653d736f6369616c" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/issues" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2f66885a8b6af96fe90f93b8aa9085f6065fb43e9c0a4a602219a01e7a142548/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c69746d75736368616f732f6c69746d7573" alt="GitHub issues"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/LitmusChaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6425eb889e05cdadcf0db2a952db7e9dda44ca3df091c5ca9feea8515a2ac44f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6c69746d75736368616f733f7374796c653d736f6369616c" alt="Twitter Follow"&gt;&lt;/a&gt;
&lt;a href="https://www.bestpractices.dev/projects/3202" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a8d5ed826be562a3339ce503c6ff3f4ab2cc63227b18ba5f65648fdb3ca04eec/68747470733a2f2f7777772e626573747072616374696365732e6465762f70726f6a656374732f333230322f6261646765" alt="OpenSSF Best Practices"&gt;&lt;/a&gt;
&lt;a href="https://app.fossa.io/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus?ref=badge_shield" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/848851b5714a120bc84e06ebdb121f455a4a472a782a90d6f4efb681fa9be392/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466c69746d75736368616f732532466c69746d75732e7376673f747970653d736869656c64" alt="FOSSA Status"&gt;&lt;/a&gt;
&lt;a href="https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8420bd8ea7dfc02f130445cdcf5f3adec631ea57f9682afc56af5940cc5ca044/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d726564" alt="YouTube Channel"&gt;&lt;/a&gt;
&lt;a href="https://gurubase.io/g/litmuschaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d14b84f34d827a00ea3da041c025456fa77e2143b06396c17636f4531500eb23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47757275626173652d41736b2532304c69746d75734368616f73253230477572752d303036424646" alt="Gurubase"&gt;&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;&lt;em&gt;Read this in &lt;a href="https://github.com/litmuschaos/litmus/translations/TRANSLATIONS.md" rel="noopener noreferrer"&gt;other languages&lt;/a&gt;.&lt;/em&gt;&lt;/h4&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://github.com/litmuschaos/litmus/translations/README-ko.md" rel="noopener noreferrer"&gt;🇰🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-chn.md" rel="noopener noreferrer"&gt;🇨🇳&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-pt-br.md" rel="noopener noreferrer"&gt;🇧🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-hi.md" rel="noopener noreferrer"&gt;🇮🇳&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;

&lt;/div&gt;

&lt;p&gt;LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses &amp;amp; potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers &amp;amp; SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles &amp;amp; community collaborated. It is 100% open source &amp;amp; a CNCF project.&lt;/p&gt;

&lt;p&gt;LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.&lt;/p&gt;

&lt;p&gt;At a high-level, Litmus comprises of:&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;

&lt;strong&gt;Chaos Control Plane&lt;/strong&gt;: A centralized chaos management tool called chaos-center, which helps construct, schedule and visualize Litmus chaos workflows&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Chaos Execution Plane Services&lt;/strong&gt;: Made up of a…&lt;/li&gt;

&lt;/ul&gt;
&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Do check out the LitmusChaos &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; and share your valuable feedback. Feel free to submit a &lt;a href="https://github.com/litmuschaos/litmus/pulls" rel="noopener noreferrer"&gt;pull request&lt;/a&gt; if you notice any necessary changes.😇&lt;br&gt;&lt;br&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%2Fxfn1k95y5nnkcca745k4.gif" alt="thankyou" width="480" height="360"&gt;

</description>
      <category>kubernetes</category>
      <category>chaosengineering</category>
      <category>litmuschaos</category>
      <category>sre</category>
    </item>
    <item>
      <title>How to use React hooks in Apollo Client for GraphQL</title>
      <dc:creator>Saranya Jena</dc:creator>
      <pubDate>Tue, 22 Sep 2020 07:33:03 +0000</pubDate>
      <link>https://dev.to/litmus-chaos/how-to-use-react-hooks-in-apollo-client-for-graphql-33bh</link>
      <guid>https://dev.to/litmus-chaos/how-to-use-react-hooks-in-apollo-client-for-graphql-33bh</guid>
      <description>&lt;p&gt;Hello World! In this blog, I am going to discuss how we can use React hooks with Apollo to connect to GraphQL API in different scenarios. Assuming that you have a basic understanding of the same, I will be explaining how GraphQL data can be shared with the UI using React hooks by giving a few examples that we are already using in our ongoing project, the &lt;a href="https://github.com/litmuschaos/litmus/tree/master/litmus-portal" rel="noopener noreferrer"&gt;Litmus Portal&lt;/a&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%2Fi%2Fxl08k5h7vtpasoco0klh.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%2Fi%2Fxl08k5h7vtpasoco0klh.png" alt="GraphQL" width="480" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is GraphQL?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Before going forward, let me give a very brief overview of GraphQL and what all things we are going to discuss. So GraphQL is a query language for APIs that is developed by Facebook. It is an efficient alternative to REST because of its features such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With GraphQL there's no over fetching or under fetching of data, unlike REST.&lt;/li&gt;
&lt;li&gt;Strongly typed graphQL schema which can be written in GraphQL Schema Definition Language (SDL) helps you validate your API requests during its compile time.&lt;/li&gt;
&lt;li&gt;With the development of various GraphQL libraries (Apollo, Relay, etc) you are getting a lot of features such as caching, realtime data, etc.&lt;/li&gt;
&lt;li&gt;It provides a large and amazing community! You can always get your queries answered whenever stuck. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was just a basic introduction to GraphQL, but I recommend you to visit the site to gain deeper insights of the same. &lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What we'll do?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;I will be mainly focussing on the front-end side, where I am gonna explain the two very useful react hooks &lt;code&gt;useQuery&lt;/code&gt; and &lt;code&gt;useMutation&lt;/code&gt;, how are we using these in our project for GraphQL operations along with the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Wait...what are GraphQL operations?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;GraphQL provides various types of operations such as Query, Mutation, and Subscription which act as the entry points for the requests sent by the client. In this blog, I'll be discussing the first two types i.e. Query and Mutation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Query:&lt;/strong&gt; &lt;code&gt;useQuery&lt;/code&gt; hook is used to fetch the data from the server and attach it to the UI. To run a query you need to call this hook by passing the query string, it returns an object from Apollo client containing &lt;code&gt;data&lt;/code&gt;, &lt;code&gt;error&lt;/code&gt;, &lt;code&gt;loading&lt;/code&gt; properties which change their values after execution. The hook is called when the component renders and the above properties can be used conditionally to render the UI. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Basic syntax:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { loading, error, data } = useQuery&amp;lt;Type1, Type2&amp;gt;(
    QUERY_STRING,
    { variables: &amp;lt;variable&amp;gt;,
onCompleted:()=&amp;gt;{console.log("query successful",data);}
,
onError:(error)=&amp;gt;{console.error(error);},
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;data&lt;/code&gt; : The required data we are getting after the query is successful.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;loading&lt;/code&gt; : It is a boolean value, if &lt;code&gt;true&lt;/code&gt;, it means the query is still in flight. After it is successful the value of &lt;code&gt;loading&lt;/code&gt; changes to &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;error&lt;/code&gt; : It stores the error if occurred while querying.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mutation:&lt;/strong&gt; &lt;code&gt;useMutation&lt;/code&gt; hook is used to send updates to the GraphQL server as a result of which data can be updated in the back-end. It is somewhat similar to &lt;code&gt;useQuery&lt;/code&gt; in terms of syntax with some minor differences. To execute a mutation, you need to pass the mutation string to the hook. This hook returns a tuple containing a &lt;code&gt;mutate&lt;/code&gt; function which can be called whenever its execution is required and an object having certain fields that represent the current status of mutation's execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Basic syntax:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const [mutateFunction,{ error,loading}] = useMutation&amp;lt;Type&amp;gt;(MUTATION_STRING, {
    onCompleted: () =&amp;gt; {
    console.log("details updated")
    },
    onError: (error) =&amp;gt; {
    onError:(error)=&amp;gt;console.error(error);
    },
    refetchQueries: [{ query: QUERY_STRING, variables: &amp;lt;variable&amp;gt;],
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;mutateFunction&lt;/code&gt; : It is the &lt;code&gt;mutate&lt;/code&gt; function which can be called anytime to run the mutation.&lt;/li&gt;
&lt;li&gt;The second parameter is the object representing the mutation's execution status such as &lt;code&gt;error&lt;/code&gt; , &lt;code&gt;loading&lt;/code&gt; which have been explained above.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In both examples, I have added options to the hooks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;onCompleted&lt;/code&gt; : It is a callback executed after a successful query/mutation.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;onError&lt;/code&gt; : Callback executed in case of an occurrence of error.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;refetchQueries&lt;/code&gt; : It takes an array or function which is used to specify a list of queries that need to be refetched after the mutation is successful.&lt;/li&gt;
&lt;/ol&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%2Fi%2Fijrglfq8825mgt68nnoa.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%2Fi%2Fijrglfq8825mgt68nnoa.png" alt="best practices" width="300" height="168"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Some of the good practices you can follow:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Type the data you are sending or receiving during the requests wherever it is required. It enhances readability and understandability.&lt;/li&gt;
&lt;li&gt;As a beginner we often tend to store the data we received from the requests in local states which is not required. Apollo Client provides an in-memory cache in which it stores the data that helps the client to respond to future queries for the same data without sending unnecessary requests. So instead of storing it in local states we can directly access and use it without making repeated requests.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now I'll be explaining some examples that we have used in our ongoing project, the Litmus Portal.&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%2Fi%2Fbw3hdpvknhsn6y48r3po.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%2Fi%2Fbw3hdpvknhsn6y48r3po.png" alt="Litmus" width="438" height="438"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;LitmusChaos&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;LitmusChaos&lt;/a&gt; is an open-source toolset to practice chaos engineering in cloud-native systems. It comes up with a large set of chaos experiments that are hosted on the &lt;a href="https://hub.litmuschaos.io" rel="noopener noreferrer"&gt;hub&lt;/a&gt;. For further details, you can check out our &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;github&lt;/a&gt; repo. Litmus Portal provides a console and UI experience for managing, monitoring, and events around chaos workflows. It is being developed using React and TypeScript for the front-end and Golang for the back-end. &lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Examples&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Without any further delay, let's get started!!&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%2Fy0i3jazbfmgdx1gewq2p.gif" 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%2Fy0i3jazbfmgdx1gewq2p.gif" alt="coding cat" width="300" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since the examples I am going to explain are a part of a project, I have excluded some parts of the logic which are not relevant to the blog. You can find the complete code &lt;a href="https://github.com/litmuschaos/litmus/tree/master/litmus-portal" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Query&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Schema&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const GET_USER = gql`
  query getUser($username: String!) {
    getUser(username: $username) {
      username
      email
      id
      name
      projects {
        members {
          user_id
          user_name
          role
          invitation
          name
          email
          joined_at
        }
        name
        id
      }
      company_name
      updated_at
      created_at
      removed_at
      is_email_verified
      state
      role
    }
  }
`;

export const ALL_USERS = gql`
  query allUsers {
    users {
      id
      name
      username
      email
    }
  }
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;GET_USER&lt;/code&gt; query string returns the complete details of a user whose &lt;code&gt;username&lt;/code&gt; is passed as a variable.&lt;br&gt;
The &lt;code&gt;ALL_USERS&lt;/code&gt; query string returns a list of all users who are present along with their details including &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;username&lt;/code&gt;, and &lt;code&gt;email&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;useQuery&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { data: dataB } = useQuery&amp;lt;CurrentUserDetails, CurrentUserDedtailsVars&amp;gt;(
    GET_USER,
    { variables: { username: userData.username } }
  );

 const { data: dataA } = useQuery(ALL_USERS, {
    skip: !dataB,
    onCompleted: () =&amp;gt; {

    //consoles the list of all users present
    console.log(dataA.users);
    },
    onError: (error) =&amp;gt; {
    //in case of error, it prints the error message in the console
    console.error(error.message)
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the above example, I have two queries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;GET_USER&lt;/code&gt; : I am sending the &lt;code&gt;username&lt;/code&gt; as variable to get all the details associated with that username. The received data can be accessed through &lt;code&gt;dataB&lt;/code&gt;. &lt;code&gt;CurrentUserDedtailsVars&lt;/code&gt; is the type of data I am sending i.e. the username and &lt;code&gt;CurrentUserDetails&lt;/code&gt; is the type of data I am receiving on a successful query. These types are stored in a separate file:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export interface Member {
  user_id: string;
  user_name: string;
  role: string;
  invitation: string;
  name: string;
  email: string;
  joined_at: string;
}

export interface Project {
  members: Member[];
  name: string;
  id: string;
}

export interface UserDetails {
  username: string;
  projects: Project[];
  name: string;
  email: string;
  id: string;
  company_name: string;
  updated_at: string;
  created_at: string;
  removed_at: string;
  is_email_verified: string;
  state: string;
  role: string;
}

export interface CurrentUserDetails {
  getUser: UserDetails;
}

export interface CurrentUserDedtailsVars {
  username: string;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ALL_USERS&lt;/code&gt; : This query is for fetching the list of all the users which can be accessed through &lt;code&gt;dataA&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;skip&lt;/code&gt; : This is a boolean value, if true, the query will be skipped. In the above logic if &lt;code&gt;dataB&lt;/code&gt; is empty i.e. unless and until &lt;code&gt;GET_USER&lt;/code&gt; query is successful &lt;code&gt;ALL_USERS&lt;/code&gt; query will be skipped. Once &lt;code&gt;dataA&lt;/code&gt; gets populated then the second query is executed. This option is useful in the cases where you need to execute the queries in specific order.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Mutation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Schema&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const SEND_INVITE = gql`
  mutation sendInvite($member: MemberInput!) {
    sendInvitation(member: $member) {
      user_id
      user_name
      role
      invitation
    }
  }
`;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;SEND_INVITE&lt;/code&gt; mutation string is used to send an invitation to a user for a selected project. Once the user accepts the invitation he/she becomes a member of that project too. As &lt;code&gt;MemberInput&lt;/code&gt; we need to send the data which includes the id of the project, the username of the user whom we are going to send the invitation, the role of user in the project name &lt;code&gt;Viewer&lt;/code&gt; or &lt;code&gt;Editor&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;useMutation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; // mutation to send invitation to selected users
  const [SendInvite, { error: errorB, loading: loadingB }] = useMutation&amp;lt;
    MemberInviteNew
  &amp;gt;(SEND_INVITE, {
    refetchQueries: [{ query: GET_USER, variables: { username } }],
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the above mutation, once the invitation is sent(mutation is successful), the &lt;code&gt;GET_USER&lt;/code&gt; query is refetched to update the data. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;MemberInviteNew&lt;/code&gt; is the type of data I am sending as variables to mutation string. The interface is defined as follows:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export interface MemberInviteNew {
  member: {
    project_id: string;
    user_name: string;
    role: string;
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;SendInvite&lt;/code&gt; is the mutate function which can be called whenever you want to execute the mutation.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; SendInvite({
   variables: {
       member: {
             project_id: "1234abc",
             user_name: "john_doe",
             role: "Editor",
               },
              },
            })
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;So these were some of the examples of GraphQL mutation and query. I hope I was able to explain these concepts well, but if you still have some queries or feedback feel free to reach out to &lt;a href="https://www.linkedin.com/in/saranya-jena-7aa24912b" rel="noopener noreferrer"&gt;me&lt;/a&gt;. Since the LitmusChaos project is completely open-source, feel free to contribute in any way possible. Visit the &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; and become one out of the many stargazers.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/litmuschaos" rel="noopener noreferrer"&gt;
        litmuschaos
      &lt;/a&gt; / &lt;a href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;
        litmus
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Litmus helps  SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub  (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;&lt;a href="https://litmuschaos.io/" rel="nofollow noopener noreferrer"&gt;LitmusChaos&lt;/a&gt;&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://avatars.githubusercontent.com/u/49853472?s=200&amp;amp;v=4"&gt;&lt;img alt="LitmusChaos" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F49853472%3Fs%3D200%26v%3D4" width="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Open Source Chaos Engineering Platform&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;&lt;a href="https://slack.litmuschaos.io" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/48844a2a28b222b400e3fbeb358770903bdcb4db693ac67fae37db71869352f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536c61636b2d4a6f696e2d707572706c65" alt="Slack Channel"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master"&gt;&lt;img src="https://github.com/litmuschaos/litmus/actions/workflows/push.yml/badge.svg?branch=master" alt="GitHub Workflow"&gt;&lt;/a&gt;
&lt;a href="https://hub.docker.com/r/litmuschaos/chaos-operator" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2a2ae2b0d21ae55811e5da33f40b76a4aa18cd37d027ab13c5f3a4b6230ef55b/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6c69746d75736368616f732f6368616f732d6f70657261746f722e737667" alt="Docker Pulls"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/stargazers" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/e87b930f5b0b40039776ad0d255d62735311c7d7228bb7615d7408161915c0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6c69746d75736368616f732f6c69746d75733f7374796c653d736f6369616c" alt="GitHub stars"&gt;&lt;/a&gt;
&lt;a href="https://github.com/litmuschaos/litmus/issues" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2f66885a8b6af96fe90f93b8aa9085f6065fb43e9c0a4a602219a01e7a142548/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c69746d75736368616f732f6c69746d7573" alt="GitHub issues"&gt;&lt;/a&gt;
&lt;a href="https://twitter.com/LitmusChaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6425eb889e05cdadcf0db2a952db7e9dda44ca3df091c5ca9feea8515a2ac44f/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6c69746d75736368616f733f7374796c653d736f6369616c" alt="Twitter Follow"&gt;&lt;/a&gt;
&lt;a href="https://www.bestpractices.dev/projects/3202" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/a8d5ed826be562a3339ce503c6ff3f4ab2cc63227b18ba5f65648fdb3ca04eec/68747470733a2f2f7777772e626573747072616374696365732e6465762f70726f6a656374732f333230322f6261646765" alt="OpenSSF Best Practices"&gt;&lt;/a&gt;
&lt;a href="https://app.fossa.io/projects/git%2Bgithub.com%2Flitmuschaos%2Flitmus?ref=badge_shield" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/848851b5714a120bc84e06ebdb121f455a4a472a782a90d6f4efb681fa9be392/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466c69746d75736368616f732532466c69746d75732e7376673f747970653d736869656c64" alt="FOSSA Status"&gt;&lt;/a&gt;
&lt;a href="https://www.youtube.com/channel/UCa57PMqmz_j0wnteRa9nCaw" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8420bd8ea7dfc02f130445cdcf5f3adec631ea57f9682afc56af5940cc5ca044/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f596f75547562652d5375627363726962652d726564" alt="YouTube Channel"&gt;&lt;/a&gt;
&lt;a href="https://gurubase.io/g/litmuschaos" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d14b84f34d827a00ea3da041c025456fa77e2143b06396c17636f4531500eb23/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f47757275626173652d41736b2532304c69746d75734368616f73253230477572752d303036424646" alt="Gurubase"&gt;&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h4 class="heading-element"&gt;&lt;em&gt;Read this in &lt;a href="https://github.com/litmuschaos/litmus/translations/TRANSLATIONS.md" rel="noopener noreferrer"&gt;other languages&lt;/a&gt;.&lt;/em&gt;&lt;/h4&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/litmuschaos/litmus/translations/README-ko.md" rel="noopener noreferrer"&gt;🇰🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-chn.md" rel="noopener noreferrer"&gt;🇨🇳&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-pt-br.md" rel="noopener noreferrer"&gt;🇧🇷&lt;/a&gt; &lt;a href="https://github.com/litmuschaos/litmus/translations/README-hi.md" rel="noopener noreferrer"&gt;🇮🇳&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;LitmusChaos is an open source Chaos Engineering platform that enables teams to identify weaknesses &amp;amp; potential outages in infrastructures by
inducing chaos tests in a controlled way. Developers &amp;amp; SREs can practice Chaos Engineering with LitmusChaos as it is easy to use, based on modern
Chaos Engineering principles &amp;amp; community collaborated. It is 100% open source &amp;amp; a CNCF project.&lt;/p&gt;
&lt;p&gt;LitmusChaos takes a cloud-native approach to create, manage and monitor chaos. The platform itself runs as a set of microservices and uses Kubernetes
custom resources (CRs) to define the chaos intent, as well as the steady state hypothesis.&lt;/p&gt;
&lt;p&gt;At a high-level, Litmus comprises of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Control Plane&lt;/strong&gt;: A centralized chaos management tool called chaos-center, which helps construct, schedule and visualize Litmus chaos workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos Execution Plane Services&lt;/strong&gt;: Made up of a…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/litmuschaos/litmus" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Last but not the least, with the upcoming Hacktober Fest, there are many issues for all levels such as good-first issues, front-end issues, complex issues, etc. So even if you are a beginner you can always submit a PR and start contributing to open source. Grab your chance to win a lot of Litmus swags and goodies upon a successful merge. So do not forget to visit the &lt;a href="https://litmuschaos.io/" rel="noopener noreferrer"&gt;Litmus site&lt;/a&gt; and join our &lt;a href="https://kubernetes.slack.com/messages/CNXNB0ZTN" rel="noopener noreferrer"&gt;community&lt;/a&gt;(#litmus channel on the Kubernetes Slack).😇&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%2Fxfn1k95y5nnkcca745k4.gif" 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%2Fxfn1k95y5nnkcca745k4.gif" alt="thankyou" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>litmuschaos</category>
      <category>react</category>
      <category>graphql</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
