Open benjaminIDruide opened 3 years ago
Hi, I have installed mercurius 8.0.0 and when I try to make validatioRule options working, I no other choice to set cache to false. Doing this, server starts but for any request I am passing to the gateway , I get this king of error
{ "data": { "accounts": null }, "errors": [ { "message": "Cannot read property 'get' of null", "locations": [ { "line": 2, "column": 3 } ], "path": [ "accounts" ] } ] }
here is my configuration on the 2 apollo server services
gateway.register(mercurius, { graphiql: false, ide: false, path: '/graphql', jit: 1, gateway: { services: [{ name: 'accounts', url: 'http://localhost:4002/graphql', rewriteHeaders: (headers, context) => { return { 'Authorization': headers.authorization } } }, { name: 'user', url: 'http://localhost:4003/graphql', rewriteHeaders: (headers, context) => { return { 'Authorization': headers.authorization } } }] }, validationRules:() => [] ,cache: false })
just removing the validationRules option , and setting back to cache:true makes the call successful
did another test right now, just setting cache to false induce this error
Could you add a script to fully reproduce the problem? Or at least enable the logs of fastify and include the full stacktrace?
Hi, I have installed mercurius 8.0.0 and when I try to make validatioRule options working, I no other choice to set cache to false. Doing this, server starts but for any request I am passing to the gateway , I get this king of error
here is my configuration on the 2 apollo server services
just removing the validationRules option , and setting back to cache:true makes the call successful