public InterfaceFieldDescriptor(MemberInfo member)
            : base(new InterfaceFieldDescription())
        {
            FieldDescription.ClrMember = member
                                         ?? throw new ArgumentNullException(nameof(member));

            FieldDescription.Name          = member.GetGraphQLName();
            FieldDescription.Description   = member.GetGraphQLDescription();
            FieldDescription.TypeReference = member.GetOutputType();
            FieldDescription.AcquireNonNullStatus(member);
        }
Ejemplo n.º 2
0
        public ObjectFieldDescriptor(MemberInfo member, Type sourceType)
            : base(new ObjectFieldDescription())
        {
            FieldDescription.ClrMember = member
                                         ?? throw new ArgumentNullException(nameof(member));

            FieldDescription.SourceType    = sourceType;
            FieldDescription.Name          = member.GetGraphQLName();
            FieldDescription.Description   = member.GetGraphQLDescription();
            FieldDescription.TypeReference = member.GetOutputType();
            FieldDescription.AcquireNonNullStatus(member);
        }