graphql-mqtt-subscriptions icon indicating copy to clipboard operation
graphql-mqtt-subscriptions copied to clipboard

Add raw data support

Open adamhjk opened this issue 5 years ago • 1 comments

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.

adamhjk avatar Feb 04 '20 18:02 adamhjk

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.

adamhjk avatar Feb 04 '20 18:02 adamhjk