Skip to content
Compare
Choose a tag to compare
@hey-api hey-api released this 06 Oct 04:31
· 14 commits to main since this release
9ca3140

Minor Changes

Updated output options

We made the output configuration more consistent by using null to represent disabled options. This change does not affect boolean options.

export default {
  input: 'hey-api/backend', // sign up at app.heyapi.dev
  output: {
    format: null,
    lint: null,
    path: 'src/client',
    tsConfigPath: null,
  },
};

Patch Changes

Updated Pinia Colada query options

Pinia Colada query options now use defineQueryOptions to improve reactivity support. Instead of calling the query options function, you can use one of the following approaches.

No params

useQuery(getPetsQuery);

Constant

useQuery(getPetByIdQuery, () => ({
  path: {
    petId: 1,
  },
}));

Reactive

const petId = ref<number | null>(1);

useQuery(getPetByIdQuery, () => ({
  path: {
    petId: petId.value,
  },
}));

Properties

const petId = ref<number | null>(1);

useQuery(() => ({
  ...getPetByIdQuery({
    path: { petId: petId.value as number },
  }),
  enabled: () => petId.value != null,
}));