-
Notifications
You must be signed in to change notification settings - Fork 51
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
refactor: Rework document rendering to avoid data duplication and mutation #68
refactor: Rework document rendering to avoid data duplication and mutation #68
Conversation
Instead of overwriting the field name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @AndrewSisley
big fan of this approach, very clean!
I only ask that you document the renderInfo.render(...)
a little bit, so readers can get a (brief) high level description/overview without going through the entire func. Or give context (eg: that it uses the recursive structure of the gql query).
Also like that you rely on the Selection
interface here to support generic objs.
983158d
to
fead82b
Compare
Thanks! And thanks for asking for more docs - that function was quite dense even without considering it's recursive nature... Should be updated now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
…ation (sourcenetwork#68) * Use dedicated property for collection name Instead of overwriting the field name * Render without mutating source doc
Closes #34