protected override IObjectFieldDescriptor ConfigureNodeField() { return(Definition.IdMember is null ? MiddlewareHelper.TryAdd( _typeDescriptor .Field(NodeType.Names.Id) .Type <NonNullType <IdType> >()) : MiddlewareHelper.TryAdd( _typeDescriptor .Field(Definition.IdMember) .Name(NodeType.Names.Id) .Type <NonNullType <IdType> >())); }
internal void ConfigureNodeField(IObjectTypeDescriptor typeDescriptor) { if (Definition.IdMember is null) { MiddlewareHelper.TryAdd( typeDescriptor .Field(NodeType.Names.Id) .Type <NonNullType <IdType> >()); } else { MiddlewareHelper.TryAdd( typeDescriptor .Field(Definition.IdMember) .Name(NodeType.Names.Id) .Type <NonNullType <IdType> >()); } }
protected override IObjectFieldDescriptor ConfigureNodeField() { Definition.NodeType = typeof(TNode); if (Definition.IdMember is null) { Definition.IdMember = Context.TypeInspector.GetNodeIdMember(typeof(TNode)); } return(Definition.IdMember is null ? MiddlewareHelper.TryAdd( _typeDescriptor .Field(NodeType.Names.Id) .Type <NonNullType <IdType> >()) : MiddlewareHelper.TryAdd( _typeDescriptor .Field(Definition.IdMember) .Name(NodeType.Names.Id) .Type <NonNullType <IdType> >())); }