Replies: 2 comments 1 reply
-
The related question is what convention to use for props. I think you raised this in your video. From the example: const user = useFragment(Avatar_UserFragment, props.user) We might want to do something more like..? const user = getFragmentData(Avatar_UserFragment, userFragment) or? const userMasked = getFragmentData(Avatar_UserFragment, user) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Completed migration |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When we move to the new
graphql-codegen
preset, we can leverage a new feature called "fragment masking". This uses a function that extracts a fragment from an operations result. By default, it is calleduseFragment
.Since a function prefixed with
use
implies a hook and this function is not a hook, we should probably rename to not cause confusion and prevent the linter from flagging false errors.5 votes ·
Beta Was this translation helpful? Give feedback.
All reactions