github logaretm/villus v1.0.0-rc.12

latest releases: v3.5.0, v3.4.0, v3.3.0...
3 years ago

🦖 TypeScript

  • Exposed the OperationResult interface #97 (7ba3972)

🆕 New Features

  • Added context option to useQuery and useMutation to support modifying headers on per query basis #96 (8248b06)
useQuery({
  query: SomeQuery,
  context: {
    headers: {
      // some headers
    }
  }
});

// can be reactive as well
useQuery({
  query: SomeQuery,
  context: computed(() => { .... })
});

useMutation(SomeMutation, {
  context: {
    headers: {
      // some headers
    }
  }
});

// can be reactive as well
useMutation(SomeMutation, {
  context: computed(() => { .... })
});

Don't miss a new villus release

NewReleases is sending notifications on new releases.