Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

feat: expand associations for single GET (salesforce + hubspot only) #2051

Merged
merged 9 commits into from
Dec 12, 2023

Conversation

asdfryan
Copy link
Contributor

@asdfryan asdfryan commented Dec 12, 2023

This is part 1 of expanding associations.

This also includes a large refactor to move includeRawData to the service / provider layers.

This also fixes a bug where we were performing schema mapping twice for managed data. (The synced data is already mapped, so no need to map it again)

TODO:

  • implement expand for uncached LIST
  • implement expand for cached LIST
  • apply schemas on expanded objects

Copy link

vercel bot commented Dec 12, 2023

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

Name Status Preview Comments Updated (UTC)
management-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 8:16pm
supaglue-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 8:16pm

records: records.map((record) => ({
...record,
raw_data:
includeRawData && fieldMappingConfig ? toMappedProperties(record.raw_data, fieldMappingConfig) : undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are reading synced data, which is already mapped. No need to map it again.

@asdfryan asdfryan merged commit 92f431a into main Dec 12, 2023
11 checks passed
@asdfryan asdfryan deleted the expand_associations branch December 12, 2023 22:17
asdfryan added a commit that referenced this pull request Dec 13, 2023
asdfryan added a commit that referenced this pull request Dec 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants