Hi,
I am trying to understand the best practices when using colocated fragments. I understand that one of the best practice is to ensure that each component is responsible for its own data requirements. If we have multiple components that needs the same field, should both field be redefined in each of the component’s colocated fragment? Also, if the parent component needs the same field as the child component, should that field be fetched in both the parent component and child component’s colocated fragment?
Example:
query X {
fieldA {
id
firstName
lastName
....ComponentA
}
}
fragment ComponentA {
firstName
lastName
}
fragment ComponentB {
firstName
lastName
}