We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 554820d commit cc82f81Copy full SHA for cc82f81
examples/graphql/apollo.config.js
@@ -0,0 +1,8 @@
1
+module.exports = {
2
+ client: {
3
+ service: {
4
+ name: 'jsonplaceholder',
5
+ url: 'https://graphqlzero.almansi.me/api',
6
+ }
7
8
+}
examples/graphql/src/pages/tasks-list/index.tsx
@@ -9,13 +9,13 @@ const QUERY = loader("./query.gql");
9
10
const TasksList = () => {
11
const { data, error, loading } = useFetch<Task[]>("todos");
12
- const query = useQuery(QUERY);
+ const { data: query } = useQuery(QUERY);
13
14
useEffect(() => {
15
// console.log("#", query.data);
16
- if (query.data) {
+ if (query) {
17
// @ts-ignore
18
- console.table(query.data.todos.data.map(({ __typename, ...details }) => ({
+ console.table(query.todos.data.map(({ __typename, ...details }) => ({
19
id: details.id,
20
title: details.title,
21
user: details.user.name,
0 commit comments