React Query with GraphQL | React Query Tutorial

  Рет қаралды 14,339

Weibenfalk

Weibenfalk

Күн бұрын

Пікірлер: 32
@Weibenfalk
@Weibenfalk 4 жыл бұрын
React-Query v3.2 is officially released now so you don't need to use the beta version =)
@CodingNuggets
@CodingNuggets 3 жыл бұрын
Never used it with graphql. I saw you talking about this in your newest video and became interested. Thanks for this info Thomas. Strongly considering changing from Apollo.
@yourdadishere
@yourdadishere 2 жыл бұрын
Dude, you have the best teaching accent--I mean, voice!
@JamesQQuick
@JamesQQuick 4 жыл бұрын
This was great. Thanks so much for this!
@Weibenfalk
@Weibenfalk 4 жыл бұрын
Thanks .. glad it helped! =)
@vasilispapasakellariou4074
@vasilispapasakellariou4074 2 жыл бұрын
Love your accent bro. Also your teaching
@dark9y8
@dark9y8 3 жыл бұрын
Thank you, subscribed!
@AdrianTwarog
@AdrianTwarog 4 жыл бұрын
Awesome!
@Weibenfalk
@Weibenfalk 4 жыл бұрын
Thanks man!
@gauravmithas2362
@gauravmithas2362 3 жыл бұрын
this was awesome tutorial, thanks @Weibenfalk
@bakbak1830
@bakbak1830 3 жыл бұрын
How i can upload files using react-query and graphql. I am really struggling on that end.
@hakuna_matata_hakuna
@hakuna_matata_hakuna 2 жыл бұрын
thank you, this is how all tutorials should be you literally threw in how to use tokens and headers which would have been a long trip to stack overflow
@Weibenfalk
@Weibenfalk 2 жыл бұрын
Thanks! Truly appreciate your support!
@tronganhnguyenthanh1157
@tronganhnguyenthanh1157 2 жыл бұрын
How can I fix the error Maximum call stack size exceeded in graphql ?
@juagarciaga
@juagarciaga 3 жыл бұрын
Hello! pretty nice your tutorial :) thank you so much for your free content. I have a question: From where is the coming `query` tag on line 13? I'm not been able to reproduce the example when the query has variables.
@Weibenfalk
@Weibenfalk 3 жыл бұрын
Hi and thanks. I'm not exactly sure what you mean. If you look at the finished project files you can see how it works. You can name your query to whatever you want like below: const GET_COUNTRY = gql` query thisCanBeNamedAnytning($code: ID!) { country(code: $code) { name } } `; The param "code" is passed in via the object to the custom hook that is created for GraphQL fetching and then graphql-request uses that argument of "code" for the query.
@roberto9369
@roberto9369 3 жыл бұрын
So nice man. Thanks
@jamesfromvenice
@jamesfromvenice 3 жыл бұрын
Hey, will this work in "getServerSideProps" or "getInitialProps" when using Next.js?
@Weibenfalk
@Weibenfalk 3 жыл бұрын
Yes ... you can grab initial data and pass it along to react-query react-query.tanstack.com/guides/ssr
@syvirren57
@syvirren57 3 жыл бұрын
Just found this, but could you do an example using this but for mutations?
@Weibenfalk
@Weibenfalk 3 жыл бұрын
I can maybe look into that.
@76Freeman
@76Freeman 3 жыл бұрын
Hi Weibenfalk, Thank you very much for the great video, I've been wondering if I should keep going with @apollo/client or give it a try with react-query and your video just convinced me to give it a try :) You've earned a new subscriber :)
@Weibenfalk
@Weibenfalk 3 жыл бұрын
Thank you!
@zomakaja
@zomakaja 3 жыл бұрын
But react-query does't have any knowledge of the qraphql schema, and therefore can't enforce type correctness on the client. Right?
@Weibenfalk
@Weibenfalk 3 жыл бұрын
Yes it can. You have to generate types with a tool for that. I’m doing that right now for my client. We’re actually using only the type generation from Apollo now
@Yassinebridii
@Yassinebridii 3 жыл бұрын
Check this out: graphql-code-generator.com/docs/plugins/typescript-react-query
@henriquekramer_
@henriquekramer_ 2 жыл бұрын
amazing tkss
@avneet12284
@avneet12284 4 жыл бұрын
So good.
@hugodsa89
@hugodsa89 2 жыл бұрын
dude the first sound literally gives a headache to anyone with headphones
@Weibenfalk
@Weibenfalk 2 жыл бұрын
Well. At least you’re awake and got your attention ;)
@hugodsa89
@hugodsa89 2 жыл бұрын
@@Weibenfalk didn’t mean to come off in a bad way mate. Just a heads up for future. 👍🏻
@Weibenfalk
@Weibenfalk 2 жыл бұрын
No worries ... I also think it's subjective and what gear people are using etc. Can't please all! But this one is not a good one .. I agree on that. Haven't used it that often.
Why I avoid useEffect For API Calls and use React Query instead
17:45
Async Fetching made easy with React-Query
11:33
Weibenfalk
Рет қаралды 7 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 6 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 942 М.
React With GraphQL (Apollo Client) Crash Course
1:06:28
Laith Academy
Рет қаралды 90 М.
React Query Tutorial | Data Fetching with React-Query
15:06
PedroTech
Рет қаралды 32 М.
React Query v3 - Refactor an app into using React-Query
24:33
Weibenfalk
Рет қаралды 4,6 М.
Building GraphQL APIs in Rust | A Comprehensive Guide
13:47
Semicolon
Рет қаралды 1,4 М.
The Hidden Cost Of GraphQL And NodeJS
28:35
ThePrimeTime
Рет қаралды 199 М.
Posting Data to Server from React - Query Updates from Mutations
22:10
GraphQL, tRPC, REST and more - Pick Your Poison
17:12
Theo - t3․gg
Рет қаралды 109 М.
GraphQL in React.js with React Query & OneGraph
11:00
Zaiste Programming
Рет қаралды 7 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 6 МЛН