[typescript-apollo-client-helpers] generated FieldPolicy type definitions
I added typescript-apollo-client-helpers to generate a typesafe StrictTypedTypePolicies. Looking at the generated FieldPolicy declarations for each entity type, I see they're all FieldPolicy
typePolicies: {
User: {
fields: {
displayName(existing) {
return existing;
},
},
},
}
The existing prop is of course any because of the generated FieldPolicy:
export type UserFieldPolicy = {
displayName?: FieldPolicy<any> | FieldReadFunction<any>,
};
I'm wondering if it's possible to - when used in tandem with the Typescript plugin - have these anys replaced with the fields actual type definitions, which in my case looks like:
export type User = {
displayName: Maybe<Scalars['String']>;
};
Thanks!
Oh I see this discussion from last year: https://github.com/dotansimha/graphql-code-generator/discussions/6047
I'll take a look at maybe doing up a PR if I feel like I understand.
Feel free to close, or leave open as a feature request.
Yes, please!