John O'Reilly
05/28/2025, 12:37 PMbod
05/28/2025, 12:43 PMJohn O'Reilly
05/28/2025, 12:56 PMJohn O'Reilly
05/28/2025, 3:39 PMcomponents {
...componentInfo
}
to
elements {
... on Component { ...componentInfo }
}
Instead of having Component
type we now have OnComponent
.....is there some way to keep/generate that Component
type?bod
05/28/2025, 4:00 PMElement
model though. But it looks like it's not just the fields that have changed, but also the structure? So I don't think you'll avoid the rename here.John O'Reilly
05/28/2025, 4:02 PMComponent
type....but that's fine.....that's what refactoring tools are for πJohn O'Reilly
05/28/2025, 4:03 PMComponent
before (and OnComponent
now) contain same info (componentInfo)bod
05/28/2025, 4:04 PMJohn O'Reilly
05/28/2025, 4:05 PMJohn O'Reilly
05/28/2025, 4:06 PMbod
05/28/2025, 4:09 PMcomponents: elements {
... on Component { ...componentInfo }
}
But I think that may be very confusing in the end π Maybe it can help as an intermediary refactoring step.John O'Reilly
06/04/2025, 4:19 PMbod
06/04/2025, 4:22 PMJohn O'Reilly
06/04/2025, 4:24 PMJohn O'Reilly
06/04/2025, 4:24 PMbod
06/04/2025, 4:27 PMswitching to that would be very significant changeYeah π also there are a few caveats.
is that the general approach usedYes I think that's it. I mean you can also look at the value of
__typename
but that may actually be less typesafe? Or maybe it's the same... in both cases what's missing is a way to be sure to be exhaustive I guess?John O'Reilly
06/04/2025, 4:28 PMJohn O'Reilly
06/04/2025, 4:28 PMJohn O'Reilly
06/04/2025, 4:29 PM