-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
GraphQL 4 #9087
GraphQL 4 #9087
Conversation
Will take a look this week mate
…On Wed, 7 Apr 2021 at 13:55, Antoine Griffard ***@***.***> wrote:
@agriffard <https://github.com/agriffard> requested your review on: #9087
<#9087> GraphQL 4 as a code
owner.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#9087 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADRUEGW37WXXTZ4UTHSJPLTHRI4NANCNFSM42QXTWYA>
.
|
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.
@agriffard these are more notes then anything; will checkout your branch and try and resolve the remaining issues + anything ele; main convern is that im not sure the dataloaders will be working as intended atm
@@ -36,9 +37,9 @@ public ListQueryObjectType(IStringLocalizer<ListQueryObjectType> S) | |||
|
|||
var dataLoader = accessor.Context.GetOrAddCollectionBatchLoader<string, ContentItem>("ContainedPublishedContentItems", x => LoadPublishedContentItemsForListAsync(x, session)); | |||
|
|||
return (await dataLoader.LoadAsync(g.Source.ContentItem.ContentItemId)) | |||
return ((await dataLoader.LoadAsync(g.Source.ContentItem.ContentItemId).GetResultAsync()) |
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.
i need to read up on the dataloader changes; but this doesnt seem right ... seems like it would return the results immediately rather then batching them into a dataloader
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.
yes this seems odd
src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/OrchardFieldNameConverter.cs
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Apis.GraphQL/RequestServicesDependencyResolver.cs
Outdated
Show resolved
Hide resolved
Now i fixed some stuff theres another bunch of compilation errors ;) will do some more over the weekend @agriffard |
theres changes around how the execution strat works for dataloaders too we will need to change; can probably remove the asynclockresolver we implemented now we can use a serial start with dataloaders and some other di changes to enforce the right scopes |
This comment has been minimized.
This comment has been minimized.
think we also need to handle https://graphql-dotnet.github.io/docs/migrations/migration4/#metadata-is-not-thread-safe |
Sorry @carlwoodhouse , it was to fix
|
Yeah I have a fix for this one I think; the type is passed wrong in the
test :) looking back one of us (I think me) set it wrong when redoing the
test to work with resolved type instead of return type
…On Fri, 9 Apr 2021 at 18:28, Antoine Griffard ***@***.***> wrote:
Sorry @carlwoodhouse <https://github.com/carlwoodhouse> , it was to fix
ShouldFilterByCollapsedWhereInputForCollapsedParts that makes an
exception:
System.InvalidCastException : Unable to cast object of type
'GraphQL.Types.StringGraphType' to type 'GraphQL.Types.ListGraphType'.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9087 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADRUEBRYMHFV4PMGSJS5HDTH42LRANCNFSM42QXTWYA>
.
|
Solved. |
is there any description of graphql n+1 issue so I could try to look at dataloaders myself? I would love to have this merged as current version is not compatible with gatsby. |
{ | ||
throw new ArgumentNullException(nameof(message)); | ||
await documentWriter.WriteAsync(stream, value); |
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.
Adding a comment here since the one before got removed
There might be another thing to solve (both on old and new implementation) Sometimes when you create new field that is also in graphql - you need to reset CMS (either by reload tenant or some other action) to make it work correctly. Also it seems that is works in graphql viewer in CMS instantly but when accessed through API it is cached or something (but CMS reload helps, does not need to be changed on client site). Otherwise no errors till now. |
so,... shall I update it to GraphQL 5 ? |
I have addressed issue with buffered stream - if its ok it can be merged into this branch. Tomorrow I plan to look at dataloaders, possibly updateto GQL 5 if it is wanted. |
Co-authored-by: Michal Kužela <[email protected]>
Also started 1 year ago. |
ping @sebastienros |
It seems RequiresPermissionValidationRuleTests is broken due to changes in newtonsoft/systemtextjson, but otherwise we are running projects on this branch for a long time without problems. I did not manage to find the problem with dataloaders though. |
Will we have someone working to get this up to GraphQL.NET 7.0.2 ? |
Would give sense, there are interesting query complexity calculation changes that could positively influence headless apps. |
Giving another try to see if we can migrate to GraphQL 4.
Many changes in versions 3 and 4:
https://graphql-dotnet.github.io/docs/migrations/migration3/
https://graphql-dotnet.github.io/docs/migrations/migration4/
update from @carlwoodhouse
I fixed a bunch of the tests and issues, still some stuff outstanding. Not sure of the state of the lucene stuff either as im not as familiar with that integration but suggest we fix the other issues before that