We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I'm using typescript with feathers-objection. And trying to make a GET request with composite-key like in the readme example:
app.service('/user-todos').get([1, 2])
But I get type error:
Argument of type 'number[]' is not assignable to parameter of type 'string | number'
Because feathers define the id to be type Id = number | string;
type Id = number | string;
As a workaround I'm currently using find method instead of get. Any suggestions?
10x
The text was updated successfully, but these errors were encountered:
A better workaround is probably to .join(',') your ids to get a comma-separated string as shown here: https://github.com/feathersjs-ecosystem/feathers-objection#composite-primary-keys
.join(',')
But yeah, the actual solution is probably to have this lib override the default feathers id type.
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm using typescript with feathers-objection.
And trying to make a GET request with composite-key like in the readme example:
But I get type error:
Because feathers define the id to be
type Id = number | string;
As a workaround I'm currently using find method instead of get.
Any suggestions?
10x
The text was updated successfully, but these errors were encountered: