I'm pretty much out of ideas how to flow type relay's modern createFragmentContainer.
I got this:
import { type RelayContext } from 'react-relay'
type Props = {
relay: RelayContext
}
relay
is prop added by container.
Component is exported this way:
export default createFragmentContainer(
Foo,
graphql`
fragment Foo_session on Session {
foo {
id
}
}
`
)
When I use this component in some other component (e.g. like this <Foo session={session} />
), I'll get this error:
Flow: Cannot create 'Foo' element because property 'relay' is missing in props [1] but exists in 'Props' [2]