Skip to content

Complexity of nested lists adds complexities instead of multiplying #62

@shalarewicz

Description

@shalarewicz

Nested results should multiply the complexity of inner results. Currently these are added.

For example the below query should have a complexity of 17 (1 query + 1 human + 5 * 3 (friends * children) );

 query { 
      human(id: 1) { 
          name, 
          friends(first: 5) { 
              name, 
              children(first: 3){ 
                  name 
              } 
          } 
      }
  }

Nested results with a complexity of 0 should not zero out outer results. In the above example if children resolved to a list of scalars, which have weight 0 then the overall complexity should be 7 (1 query + 1 human + 5 (friends ) and not 2 (1 query + 1 human + 5 * 0 (friends * children) );
;

TODO

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions