-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error message in single-root-entity-fields
Previously, this was [object object].
- Loading branch information
Showing
3 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
query byID { | ||
Delivery(id: "@{ids/Delivery/3}") { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
query byKey { | ||
Delivery (deliveryNumber: "1000521") { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
query notFound { | ||
Delivery (deliveryNumber: "does-not-exist") { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
# throws | ||
query noArgs { | ||
Delivery { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
# throws | ||
query tooManyArgs { | ||
Delivery(id: "@{ids/Delivery/3}", deliveryNumber: "1000521") { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
# currently returns null, but should probably be an error | ||
query nullArg { | ||
Delivery(id: null) { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
# throws | ||
query twoNullArgs { | ||
Delivery(id: null, deliveryNumber: null) { | ||
deliveryNumber | ||
} | ||
} | ||
|
||
# currently throws, but should probably be ok | ||
query nullAndNonNullArg { | ||
Delivery(id: null, deliveryNumber: "1000521") { | ||
deliveryNumber | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
spec/regression/logistics/tests/query-single.result.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"byID": { | ||
"data": { | ||
"Delivery": { | ||
"deliveryNumber": "1000522" | ||
} | ||
} | ||
}, | ||
"byKey": { | ||
"data": { | ||
"Delivery": { | ||
"deliveryNumber": "1000521" | ||
} | ||
} | ||
}, | ||
"notFound": { | ||
"data": { | ||
"Delivery": null | ||
} | ||
}, | ||
"noArgs": { | ||
"errors": [ | ||
{ | ||
"message": "Must specify exactly one argument to field \"Delivery\"", | ||
"locations": [ | ||
{ | ||
"line": 21, | ||
"column": 5 | ||
} | ||
], | ||
"path": [ | ||
"Delivery" | ||
] | ||
} | ||
], | ||
"data": { | ||
"Delivery": null | ||
} | ||
}, | ||
"tooManyArgs": { | ||
"errors": [ | ||
{ | ||
"message": "Must specify exactly one argument to field \"Delivery\"", | ||
"locations": [ | ||
{ | ||
"line": 28, | ||
"column": 5 | ||
} | ||
], | ||
"path": [ | ||
"Delivery" | ||
] | ||
} | ||
], | ||
"data": { | ||
"Delivery": null | ||
} | ||
}, | ||
"nullArg": { | ||
"data": { | ||
"Delivery": null | ||
} | ||
}, | ||
"twoNullArgs": { | ||
"errors": [ | ||
{ | ||
"message": "Must specify exactly one argument to field \"Delivery\"", | ||
"locations": [ | ||
{ | ||
"line": 42, | ||
"column": 5 | ||
} | ||
], | ||
"path": [ | ||
"Delivery" | ||
] | ||
} | ||
], | ||
"data": { | ||
"Delivery": null | ||
} | ||
}, | ||
"nullAndNonNullArg": { | ||
"errors": [ | ||
{ | ||
"message": "Must specify exactly one argument to field \"Delivery\"", | ||
"locations": [ | ||
{ | ||
"line": 49, | ||
"column": 5 | ||
} | ||
], | ||
"path": [ | ||
"Delivery" | ||
] | ||
} | ||
], | ||
"data": { | ||
"Delivery": null | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters