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.
If a table has a Linked Record field, the Airtable API response contains
record IDs that look something like "rec1234567890123" instead of
something intelligible. What we probably want instead is the value of
the linked record's (or linked records') primary field. This commit
adds support for fetching those values.
The way this is written, the user must add some configuration in
settings.json for each linked record field: the name of the field, the
table to which it links, and the name of that table's primary field.
Ideally, all of this could be inferred automatically, and it is indeed
possible to guess when a field's value consists of record IDs using a
regex, but unfortunately, the Airtable API doesn't offer a way to
discover a linked record field's linked table or the table's primary
field. Hence, the need to ask the user for explicit configuration.
It's possible to add some intelligent defaults, e.g. assume the field,
the table, and the table's primary field are all the same, but as the
exact desired behavior is debatable, I leave it for another time.
It's also worth noting that the performance is not ideal as we execute
N+1 API requests. I also leave that to be solved another day.