Documentation
¶
Overview ¶
Package complexity calculates the GraphQL query complexity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetQueryComplexity ¶
func GetQueryComplexity(queryString string, variables map[string]interface{}, fieldOverrides map[string]int, maxNestedLevels int) (int, error)
GetQueryComplexity calculates the total complexity of GraphQL queries by traversing the query tree. Returns an error if the calculated nested levels exceeds the specified maxNestedLevels (when maxNestedLevels > 0). Returns an error if the number of fields per object exceeds maxFieldsPerObject (100).
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
common
Package common adapted from https://github.com/graph-gophers/graphql-go/blob/master/internal/common.
|
Package common adapted from https://github.com/graph-gophers/graphql-go/blob/master/internal/common. |
query
Package query contains the logic to parse a GraphQL query.
|
Package query contains the logic to parse a GraphQL query. |
Click to show internal directories.
Click to hide internal directories.