| 12345678910111213141516171819202122 |
- // noinspection JSCheckFunctionSignatures
- export const characterQueryKeys = {
- root: ["characters"],
- options: () => [...characterQueryKeys.root, "options"],
- byId: (id) => ["character", id]
- }
- export const characterListQuery = defineQueryOptions({
- key: characterQueryKeys.root,
- query: () => useEmit("character:list")
- })
- 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)
- }))
|