C# Класс GraphQL.Validation.Rules.FieldsOnCorrectType

Fields on correct type A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as __typename
Наследование: IValidationRule
Показать файл Открыть проект

Открытые методы

Метод Описание
UndefinedFieldMessage ( string fieldName, string type, IEnumerable suggestedTypeNames, IEnumerable suggestedFieldNames ) : string
Validate ( ValidationContext context ) : INodeVisitor

Приватные методы

Метод Описание
getSuggestedFieldNames ( IGraphType type, string fieldName ) : IEnumerable

For the field name provided, determine if there are any similar field names that may be the result of a typo.

getSuggestedTypeNames ( ISchema schema, IGraphType type, string fieldName ) : IEnumerable

Go through all of the implementations of type, as well as the interfaces that they implement. If any of those types include the provided field, suggest them, sorted by how often the type is referenced, starting with Interfaces.

Описание методов

UndefinedFieldMessage() публичный Метод

public UndefinedFieldMessage ( string fieldName, string type, IEnumerable suggestedTypeNames, IEnumerable suggestedFieldNames ) : string
fieldName string
type string
suggestedTypeNames IEnumerable
suggestedFieldNames IEnumerable
Результат string

Validate() публичный Метод

public Validate ( ValidationContext context ) : INodeVisitor
context ValidationContext
Результат INodeVisitor