Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Introduce a Signal-Based API Inspired by Angular Resource API #201

Open
NetanelBasal opened this issue Dec 17, 2024 · 2 comments

Comments

@NetanelBasal
Copy link
Member

Which @ngneat/query-* package(s) are relevant/releated to the feature request?

No response

Description

It would be valuable to introduce a new Signal-based API in this library, inspired by Angular's recently introduced Resource API. This would streamline data handling, making integration with Angular applications and reactive workflows more seamless.

Motivation

The Angular Resource API provides a clean and declarative approach to managing asynchronous data. Drawing inspiration from this, a similar API in this library could:

  • Simplify server state management with Signals.
  • Improve developer experience with a declarative approach.
  • Align better with Angular's modern architecture.

Proposal

Start with a proof of concept (POC) that supports the most commonly used TanStack Query APIs. For the initial implementation:

  • Focus on core functionalities such as useQuery.
  • Exclude advanced features like pagination and infinite queries for now to keep the POC manageable.

Benefits

  • Enables better integration with Angular Signals.
  • Enhances reactivity and improves state consistency.
  • Provides a solid foundation to expand into more advanced features like pagination and caching.

Let me know if you'd like me to adjust it further or add more technical details! 🚀

Proposed solution

.

Alternatives considered

.

Do you want to create a pull request?

No

@NetanelBasal
Copy link
Member Author

@luii FYI

@Ookamini95
Copy link

Resource api is just an inferior version of the query api, but maybe a style refactor could improve DX?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants