FrontendMasters / fullstack-graphql

370 stars 911 forks source link

Querying Data Solution useQuery undefined #33

Open pcierpiatka opened 3 years ago

pcierpiatka commented 3 years ago

Branch: client According to video, you should use deconstruct for useQuery (const [data, loading, error] = useQuery(ALL_PETS)) but you get undefined on useQuery hook when you do that. If you use something like const pets = useQuery and then pets.loading, pets.data, pets.error it's works.