isographlabs / isograph

The UI framework for teams that move fast — without breaking things.
MIT License
202 stars 9 forks source link

Auto-alias all fields in the query #34

Open rbalicki2 opened 3 months ago

rbalicki2 commented 3 months ago

Problem

Solution

const queryText = 'query HomeRoute  {\
  pets {\
    id,\
    name,\
    picture,\
    tagline,\
  },\
}';

can become

const queryText = 'query HomeRoute  {\
  0: pets {\
    0: id,\
    1: name,\
    2: picture,\
    3: tagline,\
  },\
}';

Importance