Hello,
Reproducing here what happens in the ApolloServer constructor when including the validationRules property:
import { ApolloArmor } from '@escape.tech/graphql-armor';
import { ValidationRule } from 'graphql';
const armor = new ApolloArmor();
const protection = armor.protect();
const valRules : ValidationRule[] = protection.validationRules;
In this code, valRules reports in the IDE:
Type 'import("/Users/mmmattos/code/node_modules/@escape.tech/graphql-armor-cost-limit/node_modules/graphql/validation/ValidationContext").ValidationRule[]' is not assignable to type 'import("/Users/mmmattos/code/node_modules/graphql/validation/ValidationContext").ValidationRule[]'.
Type 'import("/Users/mmmattos/code/node_modules/@escape.tech/graphql-armor-cost-limit/node_modules/graphql/validation/ValidationContext").ValidationRule' is not assignable to type 'import("/Users/mmmattos/code/node_modules/graphql/validation/ValidationContext").ValidationRule'.
Types of parameters 'context' and 'context' are incompatible.
Type 'import("/Users/mmmattos/code/node_modules/graphql/validation/ValidationContext").ValidationContext' is not assignable to type 'import("/Users/mmmattos/code/node_modules/@escape.tech/graphql-armor-cost-limit/node_modules/graphql/validation/ValidationContext").ValidationContext'.
Types have separate declarations of a private property '_schema'.ts(2322)
This solved to a mismatch in the graphl version between graphql-armor (using graphql 16.8.0) and the graphql package in the root of the project (graphql 16.0.0). Aligning them to 16.8.0, fixed the issue
Hello, Reproducing here what happens in the ApolloServer constructor when including the validationRules property:
In this code, valRules reports in the IDE:
Thanks for any advice on how to solve this.