You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We are adding data masking to Apollo Client that will mask fragments in the result. To achieve the TypeScript end of this, we are utilizing GraphQL Codegen's fragment masking output generated by passing inlineFragmentTypes: "mask" in the codegen config.
What is currently missing is support for the @unmask directive we are adding as a part of this feature. We are adding this both to provide a migration path for existing Apollo Client users, and provide an escape hatch in situations where you might want to interact with the full result. We would like fragments marked with @unmask to be available in the parent type rather than stripped away as these fields will be available at runtime.
Describe the solution you'd like
We'd like the typescript-operations plugin mask mode to keep fields in fragments marked with @unmask.
Describe alternatives you've considered
We could provide our own maintained GraphQL Codegen plugin, but it would have to be a replacement for typescript-operations and we'd rather get this into core. The request is to add a tiny piece to the existing functionality.
Any additional important details?
See the data masking RFC for more details on the feature in Apollo Client. My alpha announcement comment especially has some more details in regards to how we plan to utilize the TypeScript output from typescript-operations in Apollo Client.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We are adding data masking to Apollo Client that will mask fragments in the result. To achieve the TypeScript end of this, we are utilizing GraphQL Codegen's fragment masking output generated by passing
inlineFragmentTypes: "mask"
in the codegen config.What is currently missing is support for the
@unmask
directive we are adding as a part of this feature. We are adding this both to provide a migration path for existing Apollo Client users, and provide an escape hatch in situations where you might want to interact with the full result. We would like fragments marked with@unmask
to be available in the parent type rather than stripped away as these fields will be available at runtime.Describe the solution you'd like
We'd like the
typescript-operations
plugin mask mode to keep fields in fragments marked with@unmask
.Describe alternatives you've considered
We could provide our own maintained GraphQL Codegen plugin, but it would have to be a replacement for
typescript-operations
and we'd rather get this into core. The request is to add a tiny piece to the existing functionality.Any additional important details?
See the data masking RFC for more details on the feature in Apollo Client. My alpha announcement comment especially has some more details in regards to how we plan to utilize the TypeScript output from
typescript-operations
in Apollo Client.The text was updated successfully, but these errors were encountered: