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
파일 보기 프로젝트 열기: graphql-dotnet/graphql-dotnet

공개 메소드들

메소드 설명
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