Move a property from one object to another in Javascript

The root of my problem is GraphQL does not allow fields that are not defined by my input type but the data object comes from a single form.

I would love for GraphQL to just ignore the extra field but from what I gathered, that the validation error is built by design.

So now, I need to move the property that GraphQL doesn’t know and store it in another variable so I can use it in another mutation.

What I am doing:

const items = formData.items

delete formData.items

I am just wondering if there is any new/better syntax or technique for doing the same thing.

102 thoughts on “Move a property from one object to another in Javascript”

  1. pharmacie peronne amiens therapie de couple montreal , pharmacie de garde uzes therapies used for ptsd , Shallaki en farmacia Ecuador, DГіnde comprar Shallaki 60 capsules. Shallaki en farmacia Ecuador Comprar Shallaki genГ©rico [url=https://kit.co/kalsfalo/donde-comprar-shallaki-60-capsules-shallaki-en-farmacia-ecuador#]Shallaki en farmacia Ecuador[/url] pharmacie wilson Orlistat venta online, Comprar Orlistat medicamento. Orlistat en farmacia Ecuador Comprar Orlistat genГ©rico [url=https://kit.co/emitib/orlistat-en-farmacia-ecuador-orlistat-venta-online#]Comprar Orlistat medicamento[/url] , pharmacie jessika beaulieu pharmacie de garde marseille dimanche 23 aout , pharmacie du stade annecy. incendie pharmacie amiens pharmacie ouverte autour de chez moi Comprar Tegretol medicamento, Comprar Tegretol medicamento. Tegretol en farmacia Ecuador Comprar Tegretol genГ©rico [url=https://kit.co/arlinto/comprar-tegretol-medicamento-donde-comprar-tegretol-400-mg#]Comprar Tegretol medicamento, DГіnde comprar Tegretol 400 mg[/url] , ufr pharmacie amiens these. pharmacie de garde kremlin bicetre, pharmacie leclerc olivet pharmacie beaulieu telephone . pharmacie huynh bordeaux, traitement cystite pharmacie vulliemin angers pharmacie en ligne europe .

    Reply

Leave a Comment