You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that we have encountered a bug with the ParseIDs middleware and it may be related to #72
I have a definition that roughly mirrors this:
input_object(:post_comments_input)dofield(:posted_by_user_id,:id)endconnection(:comments,node_type: :comment)dofield(:total_count,non_null(:integer),resolve: &count_resolver/3)edge(do: nil)endnodeobject(:comment)dofield(:body,non_null(:string))endnodeobject(:post)doconnectionfield(:comments,node_type: :comments)do# I like to put query args in an input object because I can deprecate the fieldsarg(:input,:post_comments_input)# This is the problem area when calling updatePostmiddleware(Absinthe.Relay.Node.ParseIDs,input: [posted_by_user_id: :user])resolve(&resolve_it/2)endendpayloadfield(:update_post)domiddleware(Absinthe.Relay.Node.ParseIDs,post_id: :post)inputdofield(:post_id,:id)field(:body,:string)endoutputdofield(:post,non_null(:post))endreslovlve(&upate_it/2)end
When I call the node query with posts there are no problems:
query TestQuery($input:PostCommentsInput,$id:ID!) {
post: node(id:$id) {
... on Post {
comments(first:0,input:$input) {
totalCount
}
}
}
}
The problem I am seeing happens when I use the updatePost mutation and then resolve the Post.comments connection like so:
I have circumvented this problem by not using the ParseIDs middleware and manually parsing the IDs, but it is not a scalable solution. I am planning to write custom middleware for this scenario, but I'd rather not. It seems like something ParseIDs should support.
Let me know if I can help clarify this any further. I know it is not a typical use-case. Thank you!
The text was updated successfully, but these errors were encountered:
I believe that we have encountered a bug with the ParseIDs middleware and it may be related to #72
I have a definition that roughly mirrors this:
When I call the node query with posts there are no problems:
The problem I am seeing happens when I use the
updatePost
mutation and then resolve the Post.comments connection like so:I get an error returned that states:
I have circumvented this problem by not using the ParseIDs middleware and manually parsing the IDs, but it is not a scalable solution. I am planning to write custom middleware for this scenario, but I'd rather not. It seems like something ParseIDs should support.
Let me know if I can help clarify this any further. I know it is not a typical use-case. Thank you!
The text was updated successfully, but these errors were encountered: