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

intro: Handle relation field introspection using the pair setup #3468

Merged
merged 1 commit into from Dec 8, 2022

Conversation

pimeys
Copy link
Contributor

@pimeys pimeys commented Dec 6, 2022

@pimeys pimeys added this to the 4.8.0 milestone Dec 6, 2022
@pimeys pimeys force-pushed the intro/relation-pairs branch 3 times, most recently from ad223a0 to e3a9c69 Compare December 8, 2022 14:56
@pimeys pimeys marked this pull request as ready for review December 8, 2022 14:56
@pimeys pimeys requested a review from a team as a code owner December 8, 2022 14:56
@pimeys pimeys force-pushed the intro/relation-pairs branch 2 times, most recently from d7a00d7 to 746bd5a Compare December 8, 2022 15:16
@@ -1,7 +1,9 @@
use super::scalar_field;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for the messy diff. Moved the single model rendering to a separate function.

@pimeys pimeys changed the title intro: RelationPairs intro: Handle relation field introspection using the pair setup Dec 8, 2022
Copy link
Contributor

@tomhoule tomhoule left a comment

Choose a reason for hiding this comment

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

It's a lot of code so hard to review, but I think I got the hang of it, looks good 👍

@@ -279,9 +411,11 @@ pub fn calculate_datamodel(
introspection_map: &introspection_map,
};

let introspection_map = crate::introspection_map::IntrospectionMap::new(input);
input.introspection_map = &introspection_map;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why we are creating the introspection map twice in this function. Maybe we should make IntrospectionMap::new()` into something that mutates the input instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The input takes a reference... That's a bit of an issue. Let's see that later.

}

let rendered = if input.render_config {
let psl_string = if input.render_config {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@pimeys pimeys merged commit 9ab56b5 into main Dec 8, 2022
@pimeys pimeys deleted the intro/relation-pairs branch December 8, 2022 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in relation field name deduplication
2 participants