isographlabs / isograph

The UI framework for teams that move fast — without breaking things.
MIT License
245 stars 16 forks source link

add magic `__link` field #282

Open PatrykWalach opened 12 hours ago

PatrykWalach commented 12 hours ago

This is a bit awkward at places because

other then that It seems to work

rbalicki2 commented 12 hours ago

should we name the field link? I think __link looks ugly... :-D

PatrykWalach commented 12 hours ago

And do we fail if there's a link already, or do we ignore? Ignoring will panic when adding server pointer, but we can warn in that case.

PatrykWalach commented 12 hours ago

type Link is not imported right know, but it's not an issue since client pointers are not implemented yet

And this is an issue, because __link can be selected manually so I guess I should fix this too

rbalicki2 commented 12 hours ago

I think we should panic with a helpful message. Eventually we can allow the user to provide a directive in a schema extension to rename the link field if they have a clash

rbalicki2 commented 12 hours ago

And maybe once we have namespaces, we can have an "internal" namespace, and the user can selected internal.link and internal.asUser etc or something

No more conflicts! Idk