Sasha
213b7c6fb6
feat: generate types for joins ( #9054 )
...
### What?
Generates types for `joins` property.
Example from our `joins` test, keys are type-safe:
<img width="708" alt="image"
src="https://github.com/user-attachments/assets/f1fbbb9d-7c39-49a2-8aa2-a4793ae4ad7e ">
Output in `payload-types.ts`:
```ts
collectionsJoins: {
categories: {
relatedPosts: 'posts';
hasManyPosts: 'posts';
hasManyPostsLocalized: 'posts';
'group.relatedPosts': 'posts';
'group.camelCasePosts': 'posts';
filtered: 'posts';
singulars: 'singular';
};
};
```
Additionally, we include type information about on which collection the
join is, it will help when we have types generation for `where` and
`sort`.
### Why?
It provides a better DX as you don't need to memoize your keys.
### How?
Modifies `configToJSONSchema` to generate the json schema for
`collectionsJoins`, uses that type within `JoinQuery`
2024-11-06 22:43:07 +02:00
..
2024-11-05 23:14:04 +02:00
2024-11-06 10:06:25 -05:00
2024-10-30 11:29:29 -06:00
2024-11-04 14:20:09 -05:00
2024-11-04 14:20:09 -05:00
2024-09-20 22:46:40 -04:00
2024-09-25 09:23:54 -04:00
2024-09-20 22:46:40 -04:00
2024-11-05 23:14:34 +02:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-10-17 16:23:45 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-11-05 13:43:51 -06:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-11-06 13:50:19 -05:00
2024-09-24 13:29:53 -04:00
2024-09-20 22:46:40 -04:00
2024-10-30 17:56:50 +00:00
2024-11-06 22:43:07 +02:00
2024-11-04 14:20:09 -05:00
2024-08-13 12:54:33 -04:00
2024-10-24 14:47:58 -04:00
2024-09-20 22:46:40 -04:00
2024-11-05 12:39:48 -05:00
2024-08-13 12:54:33 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-10-24 21:19:15 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-10-30 11:49:54 -04:00
2024-10-09 14:26:58 -04:00
2024-10-31 06:03:39 +00:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-10-30 17:56:50 +00:00
2024-11-04 17:57:41 +02:00
2024-07-23 13:44:44 -04:00
2024-11-06 22:43:07 +02:00
2024-10-24 15:46:30 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-09-20 22:46:40 -04:00
2024-11-05 13:03:12 -05:00
2024-10-11 10:01:21 -04:00
2024-07-11 15:59:38 -04:00
2024-05-25 15:45:05 +00:00
2024-10-18 05:38:48 +00:00
2023-09-01 14:45:41 -04:00
2024-03-07 11:33:46 -05:00
2024-10-24 14:47:58 -04:00
2024-09-20 22:46:40 -04:00
2024-09-16 17:02:08 +00:00
2024-08-13 12:54:33 -04:00
2024-08-13 12:54:33 -04:00
2024-09-16 17:02:08 +00:00
2024-10-07 14:20:07 -04:00
2024-09-16 17:02:08 +00:00
2024-10-22 23:22:20 +03:00
2024-10-11 18:54:39 +00:00
2024-10-11 18:54:39 +00:00
2024-10-11 18:54:39 +00:00
2024-03-19 11:31:50 -04:00
2024-08-19 17:31:36 -04:00
2024-10-24 21:19:15 -04:00
2024-05-01 17:35:41 -04:00
2024-08-13 12:54:33 -04:00
2024-08-19 17:31:36 -04:00
2024-08-14 08:57:04 -04:00
2024-08-14 08:57:04 -04:00
2024-10-14 20:02:26 +00:00
2024-10-24 21:19:15 -04:00
2024-04-06 15:06:04 -04:00
2024-06-17 14:25:36 -04:00
2024-08-19 17:31:36 -04:00
2024-03-14 23:53:47 -04:00
2024-08-29 21:25:50 -04:00
2024-10-24 21:19:15 -04:00