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

feat: add order query parameter #1789

Merged
merged 2 commits into from Mar 22, 2023
Merged

feat: add order query parameter #1789

merged 2 commits into from Mar 22, 2023

Conversation

veu
Copy link
Contributor

@veu veu commented Mar 21, 2023

Summary

Add order parameter for getAssets, getEntries, and getTags queries.

@veu veu marked this pull request as ready for review March 21, 2023 16:58
type SupportedLinkTypes = EntryFields.AssetLink | EntryFields.EntryLink<any> | undefined

export type OrderFilterPaths<Fields extends FieldsType, Prefix extends string> =
| `${Prefix}.${keyof ConditionalPick<Fields, SupportedTypes> & string}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the & string here? Isn't keyof FieldsType always a string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some cases it’s just string. Here we get string | number so we have to remove number to make TS happy.

@veu veu merged commit b672ce5 into beta-v10 Mar 22, 2023
2 checks passed
@veu veu deleted the order branch March 22, 2023 06:39
@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 10.0.0-beta-v10.30 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants