-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update data object readone resolver for legacy scaffolding #73
Update data object readone resolver for legacy scaffolding #73
Conversation
Thanks for this. A bit of an oversight! So I think the fix is correct, but we should move it to the admin module. The admin module takes on the responsibility of providing dual compatibility with graphql (it's what shims in the IDFilterType, for instance). We should extend that responsibility to update the Suggested fix: Take the resolver you've currently defined as an anonymous function, and move it to a static method in a class in the
That way, other modules that may use Bonus points if we update the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described in comment
7453621
to
89e0f91
Compare
I have updated this PR and submitted a PR with admin module silverstripe/silverstripe-admin#1260 |
aa482e5
to
19a747d
Compare
19a747d
to
4eeb13e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work. Thank you!
@unclecheese I have submitted a PR for checking the resolver silverstripe/silverstripe-graphql#411 |
Module version
0.3
Silverstripe
4.8
The history tab for data objects displays the incorrect history. It displays the history of the first viewed object.
Steps to reproduce:
1- Data object with ModelAdmin.
2- Go to Model Admin
3- Click on any item.
4- View the history. The console output looks ok as follow
5- View another item.
6- The history tab display incorrect history or the same history as the previously viewed item
Fix
The fix is based on the code from https://github.com/silverstripe/silverstripe-cms/blob/4/_legacy/GraphQL/ReadOneResolver.php