- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 262
 
Closed
Labels
bug 🔥Something isn't workingSomething isn't workingclientClient package relatedClient package relatedfeature 🚀New feature or requestNew feature or request
Description
Description
Generated ...Mutation() / ...Query() (with @pinia/colada plugin) require passing composable key when used together with @hey-api/client-nuxt
This transport detail (composable: '$fetch' | 'useAsyncData' / ...) is noise and should default internally
Config
plugins: [
  '@hey-api/client-nuxt',
  {
    name: '@pinia/colada',
    queryOptions: true,
    mutationOptions: true
  }
]Example (current)
const { mutate: updateCounteragent } = useMutation({
  ...updateCounteragentMutation()
})
updateCounteragent({ 
  // it is required key
  composable: '$fetch'
})Expected behavior
composableis optional (defaults to$fetch)
const { mutate: updateCounteragent } = useMutation({
  ...updateCounteragentMutation()
})
updateCounteragent()Reproducible example or configuration
Argument of type '{ body: { edoOperator: "SBIS"; }; path: { organization_id: string; }; onResponse: (data: FetchContext<unknown, ResponseType> & { response: FetchResponse<unknown>; }) => void; }' is not assignable to parameter of type 'Options<TComposable, UpdateCounteragentData, unknown, DefaultT>'.
  Property 'composable' is missing in type '{ body: { edoOperator: "SBIS"; }; path: { organization_id: string; }; onResponse: (data: FetchContext<unknown, ResponseType> & { response: FetchResponse<unknown>; }) => void; }' but required in type 'OmitKeys<RequestOptions<TComposable, unknown, DefaultT, string>, "body" | "path" | "query" | "url">'.
https://stackblitz.com/edit/nuxt-starter-yw7ncxpb?file=app.vue
Metadata
Metadata
Assignees
Labels
bug 🔥Something isn't workingSomething isn't workingclientClient package relatedClient package relatedfeature 🚀New feature or requestNew feature or request