Hi, how I could call functions from redis modules using ioredis?
Redis Modules provide commands with the similar interface with the native commands. For example, redis-graph offers GRAPH.CREATENODE command, so in ioredis, you should be able to use it via call method:
redis.call('GRAPH.CREATENODE', 'graph', 'label')
Thanks!!!
Is there any documentation that I can put together a test of this feature?
Do I have to do a Lua Script?
Unhandled rejection ReplyError: ERR unknown command 'GRAPH.CREATENODE'
@MichelDiz you need to compile redis with the module you want to use (prior redis 4)
Okay, I'm using Redis on Docker. I have to figure out how to do it through (local) Docker. I would have to create a new image in that case.
@MichelDiz i played with redisearch before and wrote a dockerfile for it. you may want to take a look and see https://github.com/tuananh/Dockerfile/tree/master/redisearch
I created a specific RedisGraph client based on this.
https://github.com/Jonahss/ioredisgraph