graphql-extended
graphql-extended copied to clipboard
incorrect complexity calculation?
In the example, we have a cost of 0 for scalars and 1 for field. Docs says the complexity for below query is 6
. Should it not be 2
in this case if scalars are 0 and field is 1 complex?
import { execute } from 'graphql-extended'
execute({
schema: built,
document: parse(`
query GetUserAndPosts {
user {
id
username
}
posts(limit: 20) {
name
age
}
}
`),
queryReducers: [ new ComplexityReducer() ],
})