Issue while using swaggerUI
Opened this issue · 0 comments
ajeetraina commented
@VladyslavHaiko I am facing the below issue while trying to run this app locally.
Steps to reproduce:
1. Run Docker container with RedisGraph compiled
docker run -d -p 6379:6379 redislabs/redismod
2. Clone this repo
git clone https://github.com/redis-developer/basic-redisgraph-movie-demo-app-nodejs
3. Set up environmental variable
Create .env file under the root directory of this repo and add entries like shown below:
ajeetraina@Ajeets-MacBook-Pro basic-redisgraph-movie-demo-app-nodejs % cat .env
REDIS_HOST=redis://localhost
REDIS_PORT=6379
REDIS_DB=
REDIS_PASSWORD=
REDIS_GRAPH=graphtest
4. Install dependencies
npm install
5. Run server
node app.js
6. Open localhost:3001/docs and try to hit POST /genres
Error: node_redis: The GRAPH.QUERY command contains a invalid argument type of "undefined".
Only strings, dates and buffers are accepted. Please update your code to use valid argument types.
at RedisClient.internal_send_command (/Users/ajeetraina/projects/basic-redisgraph-movie-demo-app-nodejs/node_modules/redis/index.js:849:37)
at RedisClient.send_command.RedisClient.sendCommand (/Users/ajeetraina/projects/basic-redisgraph-movie-demo-app-nodejs/node_modules/redis/lib/extendedApi.js:41:21)
at node:internal/util:325:7
at new Promise (<anonymous>)
at RedisClient.<anonymous> (node:internal/util:311:12)
at Graph.query (/Users/ajeetraina/projects/basic-redisgraph-movie-demo-app-nodejs/node_modules/redisgraph.js/src/graph.js:109:24)
at /Users/ajeetraina/projects/basic-redisgraph-movie-demo-app-nodejs/controllers/data.js:28:13
at Array.forEach (<anonymous>)
at exports.setGenres (/Users/ajeetraina/projects/basic-redisgraph-movie-demo-app-nodejs/controllers/data.js:27:10)
at Layer.handle [as handle_request] (/Users/ajeetraina/projects/basic-redisgraph-movie-demo-app-nodejs/node_modules/express/lib/router/layer.js:95:5)