Use field slugs in place of ids#116
Merged
Merged
Conversation
kalilsn
commented
Sep 27, 2023
| include: { | ||
| field: { | ||
| select: { name: true }, | ||
| select: { slug: true }, |
Contributor
Author
There was a problem hiding this comment.
For now, I've just substituted slugs for names but kept the same "values" : { "<slug>": "<value>" } structure for pub responses. But I wonder if we should modify this structure so that we can include the name as well?
kalilsn
commented
Sep 27, 2023
| props.instanceId, | ||
| props.pub.id, | ||
| props.pub.values.Title as string, | ||
| props.pub.values['unjournal/title'] as string, |
Contributor
Author
There was a problem hiding this comment.
This doesn't really matter, and probably won't happen as much when we're not hardcoding field slugs into the integrations, but even so, should I change this <community>/<short-name> format so that we can still use . to access properties?
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.
Issue(s) Resolved
Resolves #90
Test Plan
Basic smoke test of the integrations: reset your local database, then create a submission and an evaluation and make sure it works/fields are mapped properly
Additional context
I deleted the unused seed files partially just for cleanup, but also because
pnpm buildcomplains about type errors in those files even if they're not being imported and I don't want to spend time keeping them up to date when they're not being used. They'll be in the git history when we need them.