# Drawstep engine · Effects · `exchangeZones` > Exchange zones — CR 701.12a, 400.7: "exchange your graveyard and library" - every card in each of the two zones moves to the other at once. Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/effects#exchangeZones ## Where it goes One step of an ability's `effects[]` (a spell's, a trigger's, an activated ability's, a mode's): `{ "effect": "exchangeZones", … }`. Steps resolve in order. ## Fields | Field | Type | Required | Description | |---|---|---|---| | `who` | `"you" \| "controller" \| "abilityController" \| "sourceController" \| "owner" \| "eachOpponent" \| "eachPlayer" \| "target" \| "triggeringPlayer" \| "defendingPlayer" \| "attackingPlayer" \| "activePlayer" \| "re …` | no | Which player(s) — a player selector (default `you`) | | `zones` | `any[]` | yes | The two zones exchanged | | `shuffle` | `boolean` | no | ", then shuffle": the player shuffles their library afterwards | ## Minimal form ```json {"effect":"exchangeZones","zones":[]} ``` The engine reads that minimal form as: “exchange your undefined and undefined”. ## Stock examples - **Harness Infinity** — “Exchange your hand and graveyard.” ```json {"effect":"exchangeZones","who":"you","zones":["hand","graveyard"]} ``` ## Related - [Effects](https://drawstep.xyz/wiki/mtg/effects.md) — the whole topic - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive