MCPcopy Create free account
hub / github.com/TanStack/query / getCharacter

Function getCharacter

examples/react/rick-morty/src/api.ts:18–23  ·  view source on GitHub ↗
(characterId: string)

Source from the content-addressed store, hash-verified

16}
17
18export const getCharacter = async (characterId: string) => {
19 const res = await fetch(
20 `https://rickandmortyapi.com/api/character/${characterId}`,
21 )
22 return await res.json()
23}
24
25export const getLocation = async (locationId: string) => {
26 const res = await fetch(

Callers 2

CharacterFunction · 0.90
CharacterFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected