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

chore: Decouple API from tRPC handlers #11947

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Conversation

emrysal
Copy link
Contributor

@emrysal emrysal commented Oct 17, 2023

What does this PR do?

Starts decoupling the API from tRPC without touching the underlying logic.

@emrysal emrysal requested a review from keithwillcode October 17, 2023 14:14
@vercel
Copy link

vercel bot commented Oct 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 2:21pm
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 2:21pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 2:21pm
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 2:21pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 2:21pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Oct 17, 2023 2:21pm

@github-actions
Copy link
Contributor

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes!

@zomars zomars added the core area: core, team members only label Oct 17, 2023
try {
const input = getScheduleSchema.parse(req.query);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use getSchedule parser to maintain consistency between before/after.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
return await caller.getSchedule(req.query as any /* Let tRPC handle this */);
} catch (cause) {
if (cause instanceof TRPCError) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

getAvailableSlots is heavily trpc-coupled, so this will continue to work as TRPCError is just a normal error.

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@deploysentinel
Copy link

deploysentinel bot commented Oct 17, 2023

Current Playwright Test Results Summary

✅ 162 Passing - ⚠️ 4 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 10/17/2023 02:25:49pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: b07ab5d

Started: 10/17/2023 02:23:08pm UTC

⚠️ Flakes

📄   apps/web/playwright/booking-seats.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking with Seats Multiple Attendees can book a seated event time slot
Retry 1Initial Attempt
0.66% (2) 2 / 301 runs
failed over last 7 days
0.66% (2) 2 / 301 runs
flaked over last 7 days

📄   apps/web/playwright/auth/delete-account.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Can delete user account
Retry 1Initial Attempt
0.94% (3) 3 / 320 runs
failed over last 7 days
11.88% (38) 38 / 320 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 2Retry 1Initial Attempt
8.78% (28) 28 / 319 runs
failed over last 7 days
89.66% (286) 286 / 319 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
3.44% (11) 11 / 320 runs
failed over last 7 days
43.44% (139) 139 / 320 runs
flaked over last 7 days

View Detailed Build Results


@emrysal emrysal merged commit 73e1621 into main Oct 17, 2023
@emrysal emrysal deleted the chore/decouple-trpc-api-getSlots branch October 17, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants