-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[epic] Inlined client pointers #360
Comments
How do we know where to inline the fields? |
Not sure. Directive in SomeField, I would think. |
There should be one in |
Great point. Yes you're right. This works well with the project to make the parameter type of the pointer generic, in order to force you to return an ID you received from the parameter. ie BestFriendPointer and expect a return value of T, and have all the potential target IDs be replaced with T (or links?) Of course one should be able to not inline and thus return an arbitrary link, e.g. one stored in local state, in which case the parameter can't be generic |
Actually one should be able to do both for the same pointer, so I guess the return type can be T (only inline), We can probably do some cool stuff at runtime, like tagging the Link with an additional prop or putting it in a set, in order to warn if the user returns a Link from the parameter without indicating it could be inlined |
would result in the parent query containing
friends { id, closeness }
and another request fornode(id: $bestFriendId) { ... on User { name } }
.friends { id, closeness, name }
(i.e. overfetching)Other tasks
The text was updated successfully, but these errors were encountered: