graphql-mqtt-subscriptions
graphql-mqtt-subscriptions copied to clipboard
Add raw data support
Thank you so much for the library! It was (almost) exactly what we needed. Let us know if we can help further.
This commit adds the ability to return the raw topic and message buffer, allowing easier handling of binary data from mqtt inside the graphql endpoint itself.
Enable by setting the rawData option. If it is not set, it behaves
identically to the existing JSON/String path.
It also upgrades Mocha to 7.0.1, to resolve multiple security vulnerabilities with Mocha.
It looks like node 6 fails on modern versions of Mocha, but I suspect it is reasonable to no longer have support for it. Happy to do whatever makes sense for you.
It also appears like we are the first people to check in the package-lock - happy to remove it if you would rather not.