Tag: react-relay
-
When using GraphQL and Relay and Fragment, how to see the data?
0 I am onto Step 4 of the Relay Tutorial at: https://relay.dev/docs/tutorial/fragments-1/ It was strange because when I don’t use Fragment, and have the following code: const data = useLazyLoadQuery<NewsfeedQueryType>( NewsfeedQuery, {} ) console.log("HERE 1", JSON.stringify(data, null, 4)); I was able to see in the dev console for the data: HERE 1 { "topStory": {…
-
Wrap usePreloadedQuery in a custom hook
1 I’m new to working with react-relay and graphql. I’ve taken the initiative to create the custom hook below and I’m wondering if this is the correct way to do it or if it goes against the recommended practices in Relay. From the usePreloadQuery documentation I do notice that we use it on a deeper…