Closed mariusflorescu closed 4 years ago
- Issue located in: /client/src/pages/Home
const { loading, data: { getPosts: posts } } = useQuery(FETCH_POSTS_QUERY);
-Issue description: 'data' is not defined (twice) 😢
-Context: I think the problem is due to the migration to @apollo/client 3.0 (they've discussed something about some changes regarding loading / data)
-How I solved it: :
const{ loading, data={} } = useQuery(FETCH_POSTS_QUERY); const posts = data.getPosts;
I was having this same problem ٩(͡๏̯͡๏)۶
- Issue located in: /client/src/pages/Home
-Issue description: 'data' is not defined (twice) 😢
-Context: I think the problem is due to the migration to @apollo/client 3.0 (they've discussed something about some changes regarding loading / data)
-How I solved it: :