| 1234567891011121314151617181920212223 |
- export const characterQueryKeys = {
- root: ["characters"],
- options: () => [...characterQueryKeys.root, "options"],
- byId: (id) => ["character", id]
- }
- export const characterListQuery = defineQueryOptions({
- key: characterQueryKeys.root,
- query: () => useEmit("character:list"),
- normalize: true
- })
- export const characterOptionsQuery = defineQueryOptions({
- key: characterQueryKeys.options,
- query: () => useEmit("character:options")
- })
- export const characterByIdQuery = defineQueryOptions((id) => ({
- key: characterQueryKeys.byId(id),
- query: () => useEmit("character:read", id),
- normalize: true,
- redirect: { entityType: "character" }
- }))
|