rescript-apollo-client
rescript-apollo-client copied to clipboard
Add toReference to fieldPolicies
This works, but you might have ideas how to implement this, don't know if this fits well in the architecture?
Awesome. The typescript type is StoreObject | string | Reference. Is { __typename, id } that you're using here the StoreObject? It has this definition:
export interface StoreObject {
__typename?: string;
[storeFieldName: string]: StoreValue;
}
I guess I'd just want to account for the other options as I have no idea when they are relevant. Is id definitely always present?
Hmm yes. Let me look into this to make the types more correct!