Fix raw response with selections on abstract type
Previously all selections done on abstract types, would be generated as required properties in the raw response type. This PR tracks all selections on abstract types separately and only makes them required if the concrete type implements the abstract type. The change in the generated types can be seen in this diff.
To enable a gradual rollout, a disable_more_precise_abstract_selection_raw_response_type feature flag has been added that allows to opt operations out of the new raw response type generation.
@captbaritone Thoughts on this?
This looks more correct to me at first glance! Thanks for working on this. I likely won't have time to look into it more closely until after GraphQL conf. One thing we'll have to look out for is if this will cause type errors with existing places people are using raw response types and how we'll manage that rollout if it's the case.
Let me see if anyone else on the team can take a look before then.
@captbaritone This will certainly lead to type errors for existing projects. I've added a feature flag to enable an opt-out.
@captbaritone Could we land this?
@captbaritone Thanks for the review! One more question: Do you need a feature flag to turn of this addition at Meta? I just added one because I thought it's the kind of change you guys would want to have a flag for, but if you don't, I'll gladly get rid of it 😆
Do you need a feature flag to turn of this addition at Meta?
I suspect we will.