Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Graphite Automations"Add platform team as reviewer" took an action on this PR • (12/13/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (12/17/24)1 label was added to this PR based on Keith Williams's automation. |
| @IsString() | ||
| @IsOptional() | ||
| @DocsProperty() | ||
| teamName?: string; |
There was a problem hiding this comment.
The request is to fetch team event type, but we have added properties like weekStart, brandColor that makes it seem like they reside on the team event type level while in the reality all of the newly added output properties are part of a team, not team event type, and we should not mix them on the same level. We are coupling API with what atom needs too much.
So either:
- Add a new query parameter to the endpoint returning team event type which is a comma separated string
expandto which we can pass which team event type properties we want to expand e.g.?expand=teamand then if it is passed instead return newteamobject in response (see campsite thread) - Create atoms specific endpoint that returns event type just for the atom in format it needs with all the information it needs. This would also allow us to get ride of the transformApiEventTypeForAtom.ts function.
- Quickest (albeit suboptimal) solution - define property
teamon the output under which you store all newly added properties and always return them aka it is basically the same as now but creating a nestedteamin this output to not mix event type with team properties.
There was a problem hiding this comment.
I think for now the third option of defining a team in the output seems good so I'll just go with that.
| @IsInt() | ||
| @IsOptional() | ||
| @DocsProperty() | ||
| id?: number | null; |
There was a problem hiding this comment.
Team id will be defined if the team is defined, so check prisma schema for the team and see which properties are defined and not.
| @IsObject() | ||
| @IsOptional() | ||
| @DocsProperty() | ||
| team!: Team | null; |
There was a problem hiding this comment.
If you add docs property did you check the docs that the team object is actually appearing in docs? Because i think first need to add @ValidateNested decorator to actually validate the team, and then add @Type(() => Team). Also, there might already be a dto called Team so better rename it to EventTypeTeam.
There was a problem hiding this comment.
After you do this and then rebuild platform types locally and run v2 and go to http://localhost:5555/docs and confirm team is seen in output its good to go.
E2E results are ready! |
* update translations * add custom hook for platform embed * update event type ouput DTO response * fixup * display terms and conditions for embed * update v2 docs * PR feedback * update docs * PR feedback * update docs * update output DTO * update docs * update output typing * docs update * resolve merge conflicts * merge conflicts resolving * resolve merge conflicts * fixup * update docs
* update translations * add custom hook for platform embed * update event type ouput DTO response * fixup * display terms and conditions for embed * update v2 docs * PR feedback * update docs * PR feedback * update docs * update output DTO * update docs * update output typing * docs update * resolve merge conflicts * merge conflicts resolving * resolve merge conflicts * fixup * update docs

What does this PR do?
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Can be tested in the examples app under
packages/platform/examples/base