Hi,
I have tried to add query-complexity to my typegraphql project as in the docs but when i add in the query complexity options to the ValidationRules on the server i can not access req object to pass through the req variables to the resolves. I am using ApolloServer for my base server. When i try and set variables: req.query.variables the req object is not available. I have followed the docs exactly. I wonder if anyone could advise on how to get query-complexity working with ApolloServer and typegraphql?
Thanks.
See this issues:
https://github.com/slicknode/graphql-query-complexity/issues/7
https://github.com/apollographql/apollo-server/issues/1777
https://github.com/apollographql/apollo-server/pull/2232
https://github.com/apollographql/apollo-server/pull/2008
Closing as it's not in scope of TypeGraphQL.
Most helpful comment
See this issues:
https://github.com/slicknode/graphql-query-complexity/issues/7
https://github.com/apollographql/apollo-server/issues/1777
https://github.com/apollographql/apollo-server/pull/2232
https://github.com/apollographql/apollo-server/pull/2008
Closing as it's not in scope of TypeGraphQL.