-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
I don't know if it is a bug or not
For this test case
test('should consider default cost with operationName', done => {
const ast = parse(
`
query operationA {
defaultCost
}
query operationB {
defaultCost
}
`)
const context = new ValidationContext(schema, ast, typeInfo)
const visitor = new CostAnalysis(context, {
maximumCost: 100,
defaultCost: 12,
onComplete: cost => {
console.log('cost', cost)
done()
}
})
visit(ast, visitWithTypeInfo(typeInfo, visitor))
})I have 2 queries, onComplete will be called 2 times
First time, cost is 12, second time 24. 🤔
After that, i use operationName, like "operationName":"operationB"
Should operationA be analysed and count in the total cost ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels