GraphQL Tutorial #33 - Re-fetching Queries

preview_player
Показать описание
Hey gang, in this GraphQL tutorial I'll show you how we can re-fetch queries to automatically update a component without have to refresh the page,

----- COURSE LINKS:

======== Other Tutorials =========

----- NODE.JS TUTORIALS

----- MONGODB TUTORIALS

----- REACT TUTORIALS

======== Social Links ==========

Рекомендации по теме
Комментарии
Автор

Would it better to use a GraphQL subscription instead of forcing the AddBook component to have to know about the need to do the "refetchQueries" for some other component's need?

MrJasonFrank
Автор

I cant find a solution: I have home page and listed different categories of post like: news, test, travel etc. do I have to create qraphql query for all of those, or I can just filter it in react by category so in this part of site I will show only test post and on this only news post from single qraphql query?

MotoTrips
Автор

why getBooksQuery is not injected in addBooks components like how we inject getAuthors query and addBook mutation?

jemjem
Автор

Your tutorials have saved me lots of time...

fein
Автор

I guess a better way was just to hold the books on a state and change teh state when a new book was added! But i understand thats just a showcass of refetching queries

thecutedreamkostasp.
Автор

is there any reason why you didn't used axios for creating and sending queries? its more simple than all this staff

thezvid
Автор

Any idea on how to run subscriptions on the server side? I can't find anything in the docs that is in the set up of this schema?

markgalante
Автор

But why to get the whole list of books if we added only a single book. why not to get only the newly added one?

medi
Автор

Sir I got a error:
"Warning: Encountered two children with the same key, . Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version."

Can you please solve this.

hiteshsardar
Автор

Everything is working fine for me but I am getting this slight delay whenever I add the book name. It's not instantaneous as in the video. Any help will be a greatly appreciated.

pratikchakravorty
Автор

Uncaught TypeError: can't define property "addBookMutation": Object is not extensible?

amarnarayanpasuperti
Автор

Guys I have a small issue!
I am using WebStorm
The problem is that whatever query I write inside the gql function it does not get Idented .
Any clue whats wrong!?

pulkitvalecha
Автор

please update this course, with new apollo client imports and new functional components rather than class components

prasadkadu
Автор

Instead of refetchquery cant we re render the component may be using handler method...with the parent component

anikethsaha
Автор

I could not get refetchQueries working as per the tutorial

robtea
Автор

refetchQueries: [{ query: getBooksQuery }]

progCoders
join shbcf.ru