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

FIX: NestedInputBuilder doesn't work with nested '*' #538

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jun 14, 2023

Supercedes #536 and includes requested changes mentioned in that PR

Issue

Copy link
Contributor

@sabina-talipova sabina-talipova left a comment

Choose a reason for hiding this comment

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

Is it possible to add an additional test to check the case that was stated in the initial issue.

@GuySartorelli
Copy link
Member Author

I thought the answer was going to be "yes, easy peasy" but it turns out that there's something weird about the way test schemas are built which differs in some way from normal schemas....
I've created a new issue to cover that. Until that issue is resolved, I don't think there's any way to add a test for this - but I don't think this bug fix should be held back by that, since it is likely that will be a complex issue to resolve.

Copy link
Contributor

@sabina-talipova sabina-talipova left a comment

Choose a reason for hiding this comment

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

LGTM

@sabina-talipova
Copy link
Contributor

sabina-talipova commented Jun 21, 2023

@GuySartorelli, I've already approved. I couldn't reproduce issue by using provided code example in main ticket. But I have a question regarding new issue that you opened.
Does not seem to you that you get the same Exception that was mentioned in the main ticket? Did you apply your test to this solution?
Thank you.

@GuySartorelli
Copy link
Member Author

I couldn't reproduce issue by using provided code example in main ticket

Did you use this example and did you both activate the default schema and tell graphql where to look for your models file?

I have a question regarding #539 ... Does not seem to you that you get the same Exception that was mentioned in the main ticket? Did you apply your test to this solution?

That's actually exactly the problem. In that issue, the schema example doesn't cause any exception when used outside of a test context. But when used in a test, it gets the exception mentioned in that issue - which is indeed a different exception than the one this PR is fixing. So there's something about the way tests set up or build schemas that's different from the normal execution, which is causing that exception when no exception should be thrown.

@sabina-talipova
Copy link
Contributor

Did you use #535 (comment) and did you both activate the default schema and tell graphql where to look for your models file?
Yes, I did.

@sabina-talipova sabina-talipova merged commit ff11a35 into silverstripe:5.0 Jun 22, 2023
@sabina-talipova sabina-talipova deleted the pulls/5.0/nested-wildcard-queries branch June 22, 2023 00:59
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.

3 participants