MCPcopy Index your code
hub / github.com/TanStack/query / select

Function select

examples/solid/astro/src/components/SolidApp.tsx:95–109  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

93 return res
94 },
95 select(data) {
96 const nameMap = {
97 hp: 'HP',
98 attack: 'Attack',
99 defense: 'Defense',
100 'special-attack': 'Special Attack',
101 'special-defense': 'Special Defense',
102 speed: 'Speed',
103 }
104 const stats = data.stats.map((stat: any) => ({
105 name: nameMap[stat.stat.name as keyof typeof nameMap],
106 value: stat.base_stat,
107 }))
108 return stats as { name: string; value: number }[]
109 },
110 placeholderData: keepPreviousData,
111 reconcile: 'name',
112 }))

Callers

nothing calls this directly

Calls 1

properCaseFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…