Created
May 2, 2024 08:42
-
-
Save vladar/8a9a09fb116d229f7c6abfb21cf3c3cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prop( | |
"user", | |
fragment on User { | |
id, firstName, lastName | |
comments: ...UserComments | |
} | |
) | |
function MyComponent({ user }) { | |
return <UserComments comments={user.comments}> | |
} | |
@prop( | |
"comments", | |
fragment UserComments on Comment @plural { id, text } | |
) | |
function UserComments({ comments }) { | |
return <></>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment