---
title: "Discussion on \"Using GraphQL with Axios and Redux\" | Hashnode"
description: "Discussion on \"Using GraphQL with Axios and Redux\". Explained: Why I'm using this combination, how can you use it and how to handle errors?"
url: "https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Using GraphQL with Axios and Redux](https://blog.desaihetav.com/using-graphql-with-axios-and-redux?utm_source=hashnode&utm_medium=feed)

Explained: Why I'm using this combination, how can you use it and how to handle errors?

Jun 14, 2021 · 6 min read · blog.desaihetav.com  
Updated May 13, 2023  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#graphql](https://hashnode.com/tag/graphql)
-   [#redux](https://hashnode.com/tag/redux)
-   [#axios](https://hashnode.com/tag/axios)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)

## Written by

[Hetav Desai](https://hashnode.com/@desaihetav)

@desaihetav · Mumbai, Maharashtra

  
[View profile](https://hashnode.com/@desaihetav)

Software Engineer at Unacademy

Software Engineer ∙ Blogging my learnings ∙ Piano Hobbyist

## Responses 5

Markdown supported · ⌘↵ to post

[Supriya M](https://hashnode.com/@supminn)

[Jun 16, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c9fd04896a741a43a71078)

Very well explained blog Hetav! I wasn't aware that GraphQL sends status 200 for errors as well. I have used `thunkAPI` options such as `fulfillWithValue` and `rejectWithValue` to return the fulfilled and rejected values respectively. By doing so, you would avoid creating an Error object explicitly.

[Hetav Desai](https://hashnode.com/@desaihetav)

[Jun 17, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c9fd04896a741a43a71078#reply-60cb0e538ce4491f0f298440)

Thank you, Supriya! Just learnt about `fulfillWithValue` and `rejectWithValue`, it'll surely be helpful.

[Suyash Pradhan](https://hashnode.com/@suyashpradhan)

[Jun 15, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c8efed148304124fdd0c4c)

Very Well Explained, Good Read

[Hetav Desai](https://hashnode.com/@desaihetav)

[Jun 15, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c8efed148304124fdd0c4c#reply-60c923a6148304124fdd0f0c)

Thank you, Suyash!😊

[Savio Martin](https://hashnode.com/@saviomartin)

[Jun 15, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c808bd590a5c0656565502)

Great Post! Thanks it will help for sure!

[Hetav Desai](https://hashnode.com/@desaihetav)

[Jun 15, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c808bd590a5c0656565502#reply-60c868b7bbd8c506819af287)

Thank you, Savio!

[Rishabh kunwar](https://hashnode.com/@Kunwar11)

[Jun 14, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c7b8febbd8c506819ae81d)

I don't know much about graphQL but still able to understand the blog and bookmarked it for future well explained , just a req can you share some resources to get started with graphQL

[Hetav Desai](https://hashnode.com/@desaihetav)

[Jun 15, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c7b8febbd8c506819ae81d#reply-60c868a3590a5c0656565ef4)

Thank you, Rishabh! To get started with GraphQL, check out Hasura and Apollo. Both of them have good docs and Hasura also has some really nice tutorials on its YouTube channel.

[Prerana Nawar](https://hashnode.com/@precodes)

[Jun 14, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c7a3ba590a5c0656565134)

Though I don't have much context about graphQL, I understood almost everything! Thanks a lot! Would be helpful in future! 🔥💯

[Hetav Desai](https://hashnode.com/@desaihetav)

[Jun 14, 2021](https://hashnode.com/posts/using-graphql-with-axios-and-redux/60c76627bbd8c506819ae0cc/comment/60c7a3ba590a5c0656565134#reply-60c7a6e1bbd8c506819ae663)

Thank you Prerana!😊
