FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(feathers): Paginated<Result> for ServiceMethods.find by fratzinger · Pull Request #3223 · feathersjs/feathers · GitHub

fix(feathers): Paginated<Result> for ServiceMethods.find - #3223

Open
fratzinger wants to merge 3 commits into
dovefrom
fix/ServiceMethods-find-paginated
Open

fix(feathers): Paginated<Result> for ServiceMethods.find#3223
fratzinger wants to merge 3 commits into
dovefrom
fix/ServiceMethods-find-paginated

Conversation

Copy link
Copy Markdown
Member

The ReturnType of ServiceMethods['find'] was Promise<Result | Result[]>. The correct way is Promise<Paginated<Result> | Result[]>.

I also added it to ServiceOverloads.

fratzinger commented Jun 22, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

@daffl: I'm stuck with the error. The service OAuthService in @feathersjs/authentication-oauth does not follow the common service definition. OAuthService['find'] returns Promise<GrantResponse>.

It has to follow the common service definition, which should be Promise<Paginated<R> | R[]>. That is what the current error is about.

see
Pipeline:

and Code:

How to continue?

  1. use @ts-ignore to move on?
  2. make OAuthService['find'] to return an array or a paginated result?
  3. rename find of OAuthService to anything else?

fratzinger requested a review from daffl June 22, 2023 11:22

daffl commented Oct 11, 2023

Copy link
Copy Markdown
Member

I'm not sure if we can add the pagination options to the main interface - I believe that's the error that is happening since any service interface implementor now expects the pagination overloads to be implement.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL