GraphQL refresh not calling wire adaptor when used after updateRecord()
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- graphql, typescript
- Lĩnh vực
- devtools
Hướng nghiên cứu
Start with the Local Dev server's GraphQL wire-adaptor refresh path and reproduce the sequence using updateRecord followed by refreshGraphQL. Confirm the behavior with a deployed LWC and the listed CLI environment; done means the wire adaptor executes and exposes the updated record after updateRecord.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In this LWC I am developing, a user has a list of records. They can add new records or go to another page to edit one of these records. When the user updates the record and they navigate back to the list and then view the record again it still displays the old value.
For the insert and update of these records I am using the LWC createRecord and updateRecord from the uiRecordApi. For fetching the data I am only using GraphQL queries. Viewing new data after a record is inserted works fine but fails to update after an update.
From the Network tab, a call is made to update the record and then a second call is made to execute the GraphQL but the wire adaptor is never called. This only occurs when using a Local Dev server, when developing without it the data refreshes correctly.
A comment on this StackExchange post is also having the same issue.
https://salesforce.stackexchange.com/questions/421684/refresh-graphql-is-not-working-in-lwc
Steps To Reproduce:
- Start a Local Dev server
- Create a LWC with a GraphQL wire adaptor
- Use the
updateRecordmethod to update one of the records retrieved from the GraphQL query - Call the
refreshGraphQLmethod on the wire adaptor result - Make sure you have deployed your changes as changes have been made that are related to wire adaptors
Expected Result
The wire adaptor for the GraphQL query is executed.
Actual Result
The wire adaptor for the GraphQL query is not executed and the updated record is not available to be used.
Additional Information
Screenshots:
System Information
SF CLI:
shell: powershell
{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.78.3",
"nodeVersion": "node-v22.13.1",
"osVersion": "Windows_NT 10.0.26100",
"rootPath": "C:\\Users\\myUsername\\AppData\\Local\\sf\\client\\2.78.3-b3024dd",
"shell": "powershell",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.21 (core)",
"@oclif/plugin-commands 4.1.20 (core)",
"@oclif/plugin-help 6.2.25 (core)",
"@oclif/plugin-not-found 3.2.40 (core)",
"@oclif/plugin-plugins 5.4.32 (core)",
"@oclif/plugin-search 1.2.21 (core)",
"@oclif/plugin-update 4.6.31 (core)",
"@oclif/plugin-version 2.2.23 (core)",
"@oclif/plugin-warn-if-update-available 3.1.33 (core)",
"@oclif/plugin-which 3.2.29 (core)",
"@salesforce/cli 2.78.3 (core)",
"apex 3.6.8 (core)",
"api 1.3.3 (core)",
"auth 3.6.94 (core)",
"data 4.0.11 (core)",
"deploy-retrieve 3.20.0 (core)",
"info 3.4.39 (core)",
"lightning-dev 2.10.3 (user) published 13 days ago (Tue Mar 04 2025)",
"limits 3.3.46 (core)",
"marketplace 1.3.7 (core)",
"org 5.2.32 (core)",
"packaging 2.9.17 (core)",
"schema 3.3.50 (core)",
"settings 2.4.16 (core)",
"sobject 1.4.50 (core)",
"telemetry 3.6.33 (core)",
"templates 56.3.38 (core)",
"trust 3.7.65 (core)",
"user 3.6.9 (core)"
]
}
OS:
Windows 11 (Version 10.0.26100 Build 26100)
- Ngôn ngữ chính
- TypeScript
- Star
- 19
- Fork
- 19
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của salesforcecli/plugin-lightning-dev
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
salesforcecli/plugin-lightning-dev#686 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
salesforcecli/plugin-lightning-dev#627 · 2 bình luận · 1 reaction ·
-
BUG P2
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
salesforcecli/plugin-lightning-dev#544 · 4 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
salesforcecli/plugin-lightning-dev#456 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của salesforcecli/plugin-lightning-dev
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·