Skip to content
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

How would you make a connection of a union? Is this possible right now? #50

Open
cshadek opened this issue Nov 11, 2020 · 3 comments
Open
Labels

Comments

@cshadek
Copy link
Contributor

cshadek commented Nov 11, 2020

My understanding is that unions are defined using protocols and that protocols, and the Node type in a connection needs to implement Encodable. Is it possible to make a connection for a union type?

@paulofaria
Copy link
Member

Hey, @cshadek. Sorry for the delay. Yeah, I think that's the case, indeed. I have some idea of how we could solve that by creating something like a ProtocolCodable protocol which would allow us to encode and decode protocols. That would require runtime registration of concrete types, though, which might be cumbersome.

@paulofaria
Copy link
Member

Let me know if you want to work on something like this and I can help with suggestions, etc.

@cshadek
Copy link
Contributor Author

cshadek commented Mar 13, 2023

@NeedleInAJayStack given the recent focus on improving connections, it might make sense to revisit this. Do you have an idea of how this might be achieved? The current solution is to create a wrapper type that has a field referring to the union or protocol, but this is obviously not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants