Skip to content

Commit

Permalink
fix componentField docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Mar 6, 2024
1 parent 2844957 commit 2be78cf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions site/src/routes/api/react/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@ With that enabled, your components can define fragments using a slightly differe
import { GraphQL } from '$houdini'

type Props = {
user: GraphQL<`
user: GraphQL<`{
... on User @componentField(field: "Avatar") {
avatarURL
}
`>
}`>
}

export default function UserAvatar({ user } : Props) {
Expand Down Expand Up @@ -432,14 +432,14 @@ export default function ShowInfoView({ Profile }) {
import { GraphQL } from '$houdini'

type Props = {
user: GraphQL<`
user: GraphQL<`{
... on User
@componentField(field: "Avatar")
@arguments(size: { type: "Int" })
{
avatarURL(size: $size)
}
`>
}`>
}

export default function UserAvatar({ user } : Props) {
Expand Down Expand Up @@ -480,11 +480,11 @@ tell houdini which export it should use:
import { GraphQL } from '$houdini'

type Props = {
user: GraphQL<`
user: GraphQL<`{
... on User @componentField(field: "Avatar", export: "UserAvatar" ) {
avatarURL(size: $size)
}
`>
}`>
}

export function UserAvatar({ user } : Props) {
Expand Down

0 comments on commit 2be78cf

Please sign in to comment.