complexity

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

README

GraphQL Query Complexity

A library for parsing GraphQL Queries/Mutations and calculating complexity. Used by the Tharsis API.

Security

If you've discovered a security vulnerability in the GraphQL Query Complexity library, please let us know by creating a confidential issue in this project.

Statement of support

Please submit any bugs or feature requests. Of course, MR's are even better. :)

License

GraphQL Query Complexity library is distributed under Mozilla Public License v2.0.

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) (int, error)

GetQueryComplexity traverses queries and calculates complexity

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL