Skip to content

Conversation

fratzinger
Copy link
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
Copy link
Member Author

fratzinger commented Jun 22, 2023

@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:
image
and Code:
image

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 fratzinger requested a review from daffl June 22, 2023 11:22
@daffl
Copy link
Member

daffl commented Oct 11, 2023

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.

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