Skip to content

Add toReference to fieldPolicies - #113

Open
jfrolich wants to merge 4 commits into
masterfrom
to-reference
Open

Add toReference to fieldPolicies#113
jfrolich wants to merge 4 commits into
masterfrom
to-reference

Conversation

@jfrolich

@jfrolich jfrolich commented Jun 3, 2021

Copy link
Copy Markdown
Collaborator

This works, but you might have ideas how to implement this, don't know if this fits well in the architecture?

jfrolich added 4 commits June 3, 2021 14:51
This works, but you might have ideas how to implement this, don't know if this fits well in the architecture?
@jeddeloh

jeddeloh commented Jun 5, 2021

Copy link
Copy Markdown
Owner

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?

@jfrolich

jfrolich commented Jun 7, 2021

Copy link
Copy Markdown
Collaborator Author

Hmm yes. Let me look into this to make the types more correct!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants