reduxjs / redux-toolkit

The official, opinionated, batteries-included toolset for efficient Redux development
https://redux-toolkit.js.org
MIT License
10.69k stars 1.16k forks source link

Documentation - add @rtk-query/graphql-request-base-query #2892

Open Clonescody opened 1 year ago

Clonescody commented 1 year ago

I spent a while trying to find a way to make graphql requests with RTK Query, the documentation is pretty much empty with two lines pointing to a codegen plugin.

I ended up finding this package after digging OS and GH, no documentation there either but the example helped doing what I wanted to achieve.

Can you guys add a reference to this package in the RTK documentation ?

https://www.npmjs.com/package/@rtk-query/graphql-request-base-query

markerikson commented 1 year ago

Probably a good thing to have - unfortunately, we're unlikely to have time to do this ourselves any time soon.

For a lighter-weight option, you may want to look at https://redux-toolkit.js.org/rtk-query/usage/examples#react-with-graphql

phryneas commented 1 year ago

We should probably also remove this graphqlBaseQuery implementation in the docs.

And yeah, we're both pretty exhausted from the buildup to the current release, so we will probably not get to that really soon - a pull request to generally improve those things would be very welcome.

Clonescody commented 1 year ago

Sure ! Will write a PR for it 👌