-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
If a mutation returns a non integer id (like a relay node), a new record with id NaN is created.
I found this while debugging:
plugin-graphql/src/actions/action.ts
Line 44 in 0730a86
| newData.id = parseInt(newData.id, 10); |
Something like this might be better:
const newId = Number.parseInt(newData.id, 10);
if (!Number.isNaN(newId)) {
newData.id = newId;
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed