Skip to content

Commit 40d478f

Browse files
authored
Merge pull request #5402 from EmrysMyrddin/fix-5400-non-null-id
Fix non null id types handling
2 parents 18b8869 + ff003f0 commit 40d478f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/ra-data-graphql-simple/src/buildVariables.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const sanitizeValue = (type, value) => {
2525
};
2626

2727
const castType = (value, type) => {
28-
switch (`${type.kind}:${type.name}`) {
28+
const realType = type.kind === 'NON_NULL' ? type.ofType : type;
29+
switch (`${realType.kind}:${realType.name}`) {
2930
case 'SCALAR:Int':
3031
return Number(value);
3132

0 commit comments

Comments
 (0)