// helpers protected TypeDefinitionField TransformTypeField(ITypeNode type, TypeDefinitionField context, bool nullable = false) { var ctx = context ?? new TypeDefinitionField(); if (type.IsNonNullType()) { ctx.NotNullable = true; return(TransformTypeField(type.InnerType(), ctx)); } if (type.IsListType()) { ctx.IsList = true; ctx.InnerType = TransformTypeField(type.InnerType(), null); return(ctx); } ctx.Type = type.ToString(); return(ctx); }