|
|
|
|
|
by atticusberg
3159 days ago
|
|
It sounds like your child components should be fetching their own data via their own graphql queries rather than consuming it as props from the parent that's rendering them. That way the parent can just render whatever components it wants without having to worry about what data they require. |
|
Consider the Artist.Name and Artist.Disambiguation components in my GitHub example. Notice how they don't need the `mbid` prop that the ancestor component provides. I want a component like that for every single field in my Artist schema. If every one of those components duplicated the artist query, they'd all need to be passed the `mbid`, because that's how it determines what artist to retrieve. It's possible to do some tricks with `context` like I'm doing now, but I don't really trust that it's a better solution than having one query execution point with an extendable query.