Closed hamza-openinvest closed 6 years ago
Actually, this seems to refer to other symptoms from the same cause: https://github.com/mickhansen/dataloader-sequelize/issues/27 Is that correct?
It might very well be the same cause.
@mickhansen was this closed because #567 fixed it?
I found a bug with passing in a logging function to the graphql context, that as far as I can tell is caused by how dataloader-sequelize is used.
Minimal Repro: dataloader-sequelize-bug.zip
npm install
andnpm start
the zip above to run server that will repro the problem. Then go to: http://localhost:4321/graphql and run the following graphql query, twice:This is the expected output in console (line comments added for this issue):
Here is the actual output (line comments added for this issue):
I'm not sure if the problem is with how
dataloader-sequelize
is used, but I do get the expected output if I comment out this line: https://github.com/mickhansen/graphql-sequelize/blob/master/src/resolver.js#L20I think this could also lead to some serious security problems, e.g. the
passport
library adds a user object to theexpress
request object, so if consequent graphql requests get the old request object the authorization will be for a different user!Thanks for the library, and in advance for your help with this issue!