package Ġio . fluid sonic . graphql ĊĊ Ċ // Ġhttps :// graphql . github . io / graphql - spec / draft /# sec - Field - Selections - on - Objects - Interfaces - and - Un ions - Types Ċ internal Ġobject ĠField Selection Ex istence Rule Ġ: ĠValidation Rule . Singleton () Ġ{ ĊĊ ĉ override Ġfun Ġon Field Selection ( selection : ĠG Field Selection , Ġdata : ĠValidation Context , Ġvisit : ĠVisit ) Ġ{ Ċĉ ĉ val Ġparent Type Ġ= Ġdata . related Parent Type Ġ?: Ġreturn Ċĉ ĉ val Ġfield Definition Ġ= Ġdata . related Field Definition Ċĉ ĉ if Ġ( field Definition Ġ!= Ġnull ) Ċĉĉ ĉ return ĊĊĉ ĉ data . report Error ( Ċĉĉ ĉ message Ġ= Ġ" Cannot Ġselect Ġnon existent Ġfield Ġ'${ selection . name }' Ġon Ġtype Ġ'${ parent Type . name }'. ", Ċĉĉ ĉ nodes Ġ= ĠlistOf ( selection . name Node ) Ċĉ ĉ ) Ċ ĉ } Ċ } Ċ