How to set a relation using a pointer?

I have two classes, Auction which has a relation field set to the class Categories.

When creating an Auction, I query all categories to choose from in a select field. The select field return the entire Category Parse.Object. When I send the form, I send the Parse.Object to the category field in the auction and I get

"code":111,"stack":"Error: schema mismatch for Auction.category; expected Relation<Categories> but got Pointer<Cate

How do I set the relation of Auction to the category and why does Parse return a Pointer when I query the Categories class?

Could you please share the current code that you have? It will be much easier to understand.

I actually figured it out. In my code at first I was retrieving all the form values to save my auction. So I was passing an object like auction.set({end_date: xxx, start_date: xxx, title: someTitle, category: Pointer<Categories>, description: someDesc})

It did not work because category needed to be relation, and my select field for categories returned pointers. Also, by calling the save method in the way above, if I then tried to call auction.relation(‘category’).add() it was throwing me an error saying ‘Called .relation() on a non-relation field’. Apparently by setting category to something else than a relation it was fucking up the schema or whatever. I had to do it like this

export class AuctionService {

    constructor(private toaster: ToastService) {

    public async createAuction(formValues): Promise<void> {
        const newAuction = new Auction()
        try {
            newAuction.set('start_date', new Date(formValues.start_date))
            newAuction.set('end_date', new Date(formValues.end_date))
            newAuction.set('description', formValues.description)
            const catRelation = newAuction.relation('category')
        } catch (e) {
            this.toaster.presentErrorToast('901', e)
            throw (e)