normy

Automatic normalization and data updates for data fetching libraries (react-query, swr, rtk-query and more)

MIT License

Downloads
5.4K
Stars
257
Committers
3

Bot releases are hidden (Show)

normy - @normy/react-query v0.7.0

Published by klis87 over 1 year ago

  • refactored createNormalizedQueryClient into createQueryNormalizer - it is not only about the name, but mostly createQueryNormalizer does not create react-query client for you, you need to do it yourself and pass instance to createQueryNormalizer, for example:

    const queryClient = new QueryClient();
    
    createQueryNormalizer(queryClient);
    
  • added possibility to clear normalized data and unsubscribe from future updates, for example:

    const normalizer = createQueryNormalizer(queryClient);
    
    normalizer.clear();
    
normy - @normy/core v0.6.0

Published by klis87 over 1 year ago

Added clearNormalized, so it is possible now to clear all normalized data. You can use it like this:

const normalizer = createNormalizer(normalizerConfig);

normalizer.clearNormalizedData();
normy - @normy/react-query v0.6.1

Published by klis87 over 1 year ago

Fixed the way queries keys are calculated. Before the fix, query key like ['book', { liked: true }], did not work. Now all keys are supported, including nested arrays and objects.

normy - @normy/react-query v0.6.0

Published by klis87 over 1 year ago

  • updated core to version 0.5.0 to use new devLogging option
normy - @normy/core v0.5.0

Published by klis87 over 1 year ago

  • added devLogging option to turn on logging in development
  • tech: updated lerna to version 6, utilize nx cache and switch from yarn to pnpm
normy - @normy/react-query v0.5.0

Published by klis87 over 1 year ago

  • fix createNormalizedQueryClient types, now both arguments are optional
  • add normalize option to createNormalizedQueryClient, true by default, when you pass false, it will disable normalization for queries and mutations, unless you explicitly turn it on for a given query or mutation
normy - @normy/react-query v0.4.0

Published by klis87 over 1 year ago

  • rewritten to Typescript
  • updated @normy/core dependency to 0.4.0
normy - @normy/core v0.4.0

Published by klis87 over 1 year ago

  • rewritten to TypeScript - previously the library was written in JavaScript with just TypeScript types, now it is 100% Typescript with autogenerated types
  • added tests to achieve 100% coverage
  • removed shouldObjectBeNormalized, having getNormalisationObjectKey is enough, if getNormalisationObjectKey returns undefined it just means that an object should not be normalized
normy - @normy/react-query v0.3.0

Published by klis87 over 1 year ago

  • added possibility to disable normalization per query and mutation
  • added support for optimistic updates
  • updated to use @normy/core v0.3.0 internally
normy - @normy/core v0.3.0

Published by klis87 over 1 year ago

API change - all methods to update normalized state were renamed.

normy - @normy/react-query v0.2.0

Published by klis87 over 1 year ago

Added onQueryRemoval call on queries garbage collection.

normy - @normy/core v0.2.0

Published by klis87 over 1 year ago

Added onQueryRemoval method to allow clearing unused queries.

normy - @normy/react-query v0.1.0

Published by klis87 over 1 year ago

Initial release

normy - @normy/core v0.1.0

Published by klis87 over 1 year ago

Initial release