Beispiel #1
0
        public EntityGraphQLType(
            IEntityDescriptor descriptor,
            IGraphQLMapper mapper)
        {
            _mapper     = mapper;
            _properties = descriptor.Properties;

            Name        = descriptor.Name;
            Description = XmlDoc.ReadSummary(descriptor.EntityType);

            AddField(new FieldType
            {
                Name         = "id",
                Description  = $"The ID of the {descriptor.Name.Humanize(LetterCasing.LowerCase)}.",
                ResolvedType = new NonNullGraphType(new IdGraphType()),
                Resolver     = new FuncFieldResolver <IEntity, Guid>(resolveContext => resolveContext.Source.Id),
            });
        }
 public ByYearAndMonthGraphQLMapper(IGraphQLMapper mapper)
 {
     _mapper = mapper;
 }
 public OptionGraphQLMapper(IGraphQLMapper mapper)
 {
     _mapper = mapper;
 }