Slackbot
12/16/2021, 2:30 AMHyeseong Kim
12/16/2021, 3:08 AMwhatastunning
12/16/2021, 3:14 AMHyeseong Kim
12/16/2021, 3:14 AMHyeseong Kim
12/16/2021, 3:14 AMTony Won
# RootComponent.tsx
import { FragmentSomethingWow } from './Something'
const RootComponent = () => {
useQuery(graphql`
query ... {
...Something_wow
${FragmentSomethingWow}
}
`)
}
# Something.tsx
import { Something_wow } from './__generated__/Something_wow.graphql'
export const FragmentSomethingWow = graphql`
fragment Something_wow on Query {
...
}
`
interface SomethingProps {
wow: Something_wow
}
const Something = (props) => {
return (
<div>
{props.wow...}
</div>
)
}
이런식으로 못하려나요 ㅎㅎ Apollo를 안쓴지 너무 오래되서요 ㅠHyeseong Kim
12/16/2021, 8:33 AMHyeseong Kim
12/16/2021, 8:34 AMHyeseong Kim
12/16/2021, 8:34 AMHyeseong Kim
12/16/2021, 8:35 AMHyeseong Kim
12/16/2021, 8:36 AMHyeseong Kim
12/16/2021, 8:37 AMHyeseong Kim
12/16/2021, 8:37 AMHyeseong Kim
12/16/2021, 8:37 AM