MPDX-9703 Fix Google Calendar sync for To Do / Letter-Card activity types#1831
Open
jbirdjavi wants to merge 1 commit into
Open
MPDX-9703 Fix Google Calendar sync for To Do / Letter-Card activity types#1831jbirdjavi wants to merge 1 commit into
jbirdjavi wants to merge 1 commit into
Conversation
…ctivityTypeEnum The Google Calendar integration subgraph maintains its own copy of ActivityTypeEnum. It drifted out of sync with the canonical enum when the To Do and Letter/Card activity types were added, so turning on calendar sync for tasks of those types threw "Enum ActivityTypeEnum cannot represent value" from graphql-js. Add the four missing values to restore parity. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Bundle sizes [mpdx-react]Compared against 55ac2c0 No significant changes found |
canac
approved these changes
Jun 10, 2026
canac
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Is there an account we can impersonate and test this on?
Author
|
@canac Scott Mitchell said he encountered it on staging. |
Contributor
|
Preview branch generated at https://MPDX-9703-google-cal-activity-type-enum.d3dytjb8adxkk5.amplifyapp.com |
Contributor
|
I'm having trouble reproducing the issue and proving the fix works, but I trust you. And I know we want those two enum definitions to be sychronized. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Turning on Google Calendar sync for tasks of certain activity types throws a graphql-js error and blocks sync:
Root cause
The Google integration is a REST endpoint in mpdx_api, which this app stitches into GraphQL as its own subgraph. That subgraph keeps a hand-maintained copy of
ActivityTypeEnumingoogleAccountIntegrations.graphql, and it drifted out of sync with the canonical enum when the To Do and Letter/Card activity types were added (mpdx_api, March 2025).GoogleAccountIntegration.calendarIntegrations: [ActivityTypeEnum!]!is resolved against this incomplete enum.parse.tsuppercases the REST values (follow_up_to_do→FOLLOW_UP_TO_DO), and graphql-js then fails to serialize them against the subgraph enum that's missing those values.The merged client schema (
src/graphql/schema.graphql,types.generated.ts) already had all values, which is why this hid for so long. The runtime subgraph schema is built from this typedef alone, so it threw.Change
Add the four missing values to the subgraph
ActivityTypeEnumso it matches the canonical list:FOLLOW_UP_LETTER_CARDFOLLOW_UP_TO_DOINITIATION_TO_DOPARTNER_CARE_LETTER_CARDThe subgraph enum is now byte-identical to
src/graphql/schema.graphql. No codegen artifacts change (they were already complete from the merged schema).Follow-up
Longer term, this enum should be sourced from the shared schema rather than maintained as a second hand-written copy, to prevent future drift.
Jira: MPDX-9703 (surfaced during QA of MPDX-8537)
🤖 Generated with Claude Code