-
Notifications
You must be signed in to change notification settings - Fork 154
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: Regression of outdated vfolder
GQL resolver
#3047
base: main
Are you sure you want to change the base?
Conversation
@@ -1875,16 +1875,23 @@ async def resolve_vfolder( | |||
user_id: Optional[uuid.UUID] = None, | |||
) -> Optional[VirtualFolder]: | |||
graph_ctx: GraphQueryContext = info.context | |||
user_role = graph_ctx.user["role"] | |||
loader = graph_ctx.dataloader_manager.get_loader( | |||
graph_ctx, | |||
"VirtualFolder.by_id", |
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 want to use get_loader_by_func
and VirtualFolder.batch_load_by_id
here, but then I'm getting a type error since the return type of VirtualFolder.batch_load_by_id
differs from what get_loader_by_func
expects.
@@ -1627,7 +1627,7 @@ async def batch_load_by_id( | |||
query, | |||
cls, | |||
ids, | |||
lambda row: row["user"], |
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.
Since user_id
is provided as a separate argument, the id
here should be the vfolder's id.
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 think the news fragment has been sabotaged by gitub action.. please resolve it
Resolved in #3059. |
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.
Please update the PR title and the news fragment to "which GQL query resolver" is fixed. Broken Vfolder GQL
is too vague
Vfolder
GQLVFolder
GQL outdated resolver
VFolder
GQL outdated resolverVFolder
GQL due to outdated resolver
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.
Please refer which GQL query resolver is fixed. e.g. Fix GraphQL vfolder
query.
VFolder
GQL could mean many other queries such as vfolder
, vfolder_list
, vfolder_node
etc
VFolder
GQL due to outdated resolvervfolder
GQL resolver
I used uppercase letters to maintain consistency with other PRs, but since it could cause misunderstandings, I changed it to lowercase. |
.fix.md -> 3047.fix.md
82e5273
to
730212e
Compare
When using
vfolder
GQL in the main branch, the following error occurs:This PR resolves several issues causing the
VFolder
GQL to malfunction in the current main branch.Request example
Checklist: (if applicable)
📚 Documentation preview 📚: https://sorna--3047.org.readthedocs.build/en/3047/
📚 Documentation preview 📚: https://sorna-ko--3047.org.readthedocs.build/ko/3047/