Documentation
¶
Index ¶
- type Error
- func CoerceArgumentValues(node ast.Node, argumentDefinitions map[string]*schema.InputValueDefinition, ...) (map[string]interface{}, *Error)
- func CoerceVariableValues(s *schema.Schema, features schema.FeatureSet, ...) (map[string]interface{}, *Error)
- func ValidateDocument(doc *ast.Document, s *schema.Schema, features schema.FeatureSet, ...) []*Error
- type Location
- type Rule
- type TypeInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
func CoerceArgumentValues ¶
func CoerceVariableValues ¶
func CoerceVariableValues(s *schema.Schema, features schema.FeatureSet, operation *ast.OperationDefinition, variableValues map[string]interface{}) (map[string]interface{}, *Error)
func ValidateDocument ¶
type Rule ¶
func ValidateCost ¶
func ValidateCost(operationName string, variableValues map[string]interface{}, max int, actual *int, defaultCost schema.FieldCost) Rule
Calculates the cost of the given operation and ensures it is not greater than max. If max is -1, no limit is enforced. If actual is non-nil, it is set to the actual cost of the operation. Queries with costs that are too high to calculate due to overflows always result in an error when max is non-negative, and actual will be set to the maximum possible value.
type TypeInfo ¶
type TypeInfo struct {
SelectionSetTypes map[*ast.SelectionSet]schema.NamedType
VariableDefinitionTypes map[*ast.VariableDefinition]schema.Type
FieldDefinitions map[*ast.Field]*schema.FieldDefinition
ExpectedTypes map[ast.Value]schema.Type
DefaultValues map[ast.Value]interface{}
}
func NewTypeInfo ¶
Click to show internal directories.
Click to hide internal directories.