예제 #1
0
 internal static (IGraphType resolvedType, Type type) GetNamedTypes(this IGraphType type)
 {
     return(type switch
     {
         NonNullGraphType nonNull => nonNull.ResolvedType != null?GetNamedTypes(nonNull.ResolvedType) : (null, GetNamedType(nonNull.Type)),
             ListGraphType list => list.ResolvedType != null?GetNamedTypes(list.ResolvedType) : (null, GetNamedType(list.Type)),
                 _ => (type, null)
     });
 public static IGraphType GetNamedType(this IGraphType type)
 {
     return(type switch
     {
         NonNullGraphType nonNull => GetNamedType(nonNull.ResolvedType),
         ListGraphType list => GetNamedType(list.ResolvedType),
         _ => type
     });