graphile/subscriptions-lds does not trigger on DELETE if subscription contains only edges
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- graphql, javascript, postgresql
调研方向
首先,使用提供的 comments 表和仅包含 edges 的 subscription 重现该问题,然后将其与同时请求 nodes 的版本进行比较。跟踪 @graphile/subscriptions-lds 如何处理这些选择的删除通知。当删除一行时,仅包含 edges 的 subscription 能够更新,且不需要 nodes,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary
If the subscription contains only edges, the subscription doesnt provide live updates for delete.
For create and update this works as expexted.
Steps to reproduce
- If we have the following database table:
CREATE TABLE comments (id INTEGER PRIMARY KEY AUTOINCREMENT, content TEXT);
- The follwing subscription will ONLY get updates on row insert and update:
subscription Comment {
allComemnts {
edges {
id
content
}
}
}
- However adding the nodes section (with any column in the table) will allow row delete notifications:
subscription Comment {
allComments {
nodes {
id
}
edges {
id
content
}
}
}
Expected results
When row is deleted subscription data should update even if query contains only edges.
Actual results
Row deletion does not update the data, unless nodes section is specified.
Additional context
- Postgres: 14
- postgraphile: 4.12.11
- @graphile/subscriptions-lds: 4.12.3
Possible Solution
As a workaround you can define any column in the nodes section, like so. This will allow you to get updates on row deletes.
subscription Comment {
allComments {
nodes {
id
}
edges {
id
content
}
}
}
- 主要语言
- JavaScript
- 星标
- 764
- 派生
- 128
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
graphile/graphile-engine 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 35/100
graphile/graphile-engine#869 · 1 条评论 · 1 个 reaction ·
-
Provide a type guard to distinguish between ResolveTree and FieldsByTypeName可能重新可做 关联的 PR 已关闭且未合并。 未关闭enhancement
难度 2/5 1-3 小时 新手友好度 45/100
graphile/graphile-engine#849 · 2 条评论 · 1 个 reaction ·
-
Race condition when closing LDS可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 32/100
graphile/graphile-engine#755 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 15/100
graphile/graphile-engine#725 · 17 条评论 · 5 个 reaction ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
graphile/graphile-engine#723 ·
查看 graphile/graphile-engine 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
directus/directus#28558 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
cloudflare/workers-sdk#17189 ·
维护者通常 1 天内回复
-
AWS Lambda Waiting for: Product Owner
难度 1/5 1 小时以内 新手友好度 82/100
getsentry/sentry-javascript#26910 · 1 条评论 ·
维护者通常 1 天内回复
-
[🐛 Bug]: @wdio/reporter drops the function name of a string script in command output可能已有人在做 @dhananjay6561 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
webdriverio/webdriverio#16507 · 1 条评论 ·
维护者通常 1 天内回复