Open FedericoBiccheddu opened 3 years ago
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
For sure. I already done the update, but I don't know how to test this particular refactoring. Any hint or suggestion?
I don't know, I imagine this was sparked from some real-world issue.
It is a real-world issue (the code in the first comment is actually used in our repo) but we don't test those types or we have to support old installation of this library.
I'll try to update types.ts
to reflect this change.
I'm using the default
mercurius
' PubSub implementation, but typings do not help working with Typescript and code-first libraries likegqtx
ornexus
because everysubscribe
orpublish
call needs to be manually typed.The following should cover most of the use cases without breaking old implementation: