popular-magentaP
Refine2y ago
24 replies
popular-magenta

data returned from useOne is always undefined even if the query is responding correctly

I have this graphql based useOne implementation. The request and response is okay when checked in the network tab but the data returned by the useOne() hook is undefined.

const { data, error } = useOne({
    resource: 'users',
    id: '2808d117-590e-4659-8520-40273115040b',
    meta: {
      gqlQuery: USERS_QUERY,
    },
  });

  console.log(data, error);
Was this page helpful?