private IEnumerable <object> CreateList(IEnumerable inputObject, GraphQLList typeDefinition) { foreach (var item in inputObject) { yield return(this.TranslatePerDefinition(item, typeDefinition.MemberType)); } }
public GraphQLList CreateInputList(Type arrayType) { var memberType = ReflectionUtilities.GetCollectionMemberType(arrayType); var schemaType = this.GetSchemaInputTypeFor(memberType); var list = new GraphQLList(schemaType); return(list); }
private IEnumerable CreateSingleValueList(object inputObject, GraphQLList typeDefinition) { var systemType = this.schemaRepository.GetInputSystemTypeFor(typeDefinition.MemberType); var singleValue = this.TranslatePerDefinition(inputObject, typeDefinition.MemberType); singleValue = ReflectionUtilities.ChangeValueType(singleValue, systemType); yield return(singleValue); }
internal static IntrospectedType CreateForList(GraphQLList type, IntrospectedType listItemType) { var introspectedType = new IntrospectedType(); introspectedType.Name = type.Name; introspectedType.Description = type.Description; introspectedType.Kind = TypeKind.LIST; introspectedType.OfType = listItemType; return(introspectedType); }
private IntrospectedType IntrospectListType(GraphQLList type, Func <IntrospectedType> innerType) { return(IntrospectedType.CreateForList(type, innerType())); }