-
Notifications
You must be signed in to change notification settings - Fork 434
FieldResult
should "bubble up" in case of an error when the field is declared as Non-Null
#84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Any progress on this one? It bit us today. Happy to help where possible |
I don't know if anyone is currently working on this. /cc @mhallin |
This issue has been resolved on the master branch and will be part of the next release. |
Wonderful, thanks @mhallin ! |
I think there's still an issue here for array fields. I've got a schema that looks like schema {
query: Query
mutation: Mutations
}
# DateTime
scalar DateTimeUtc
type Query {
queueEntry(id: Uuid!): QueueEntry
session(id: Uuid!): Session
}
type QueueEntry {
id: Uuid!
session: Session!
}
type Session {
id: Uuid!
queueEntries: [QueueEntry!]!
}
# Uuid
scalar Uuid I've modified the {
queueEntry(id: "f01f415f-42fc-4e49-9600-56227e2edd96") {
id
session {
id
}
}
} {
"data": {
"queueEntry": null
},
"errors": [
{
"message": "Fake Error",
"locations": [
{
"line": 4,
"column": 5
}
],
"path": [
"queueEntry",
"session"
]
}
]
} However, when I query a {
session(id: "9cc55702-6c3e-491e-b259-e8c6982c6073") {
id
queueEntries {
id
session {
id
}
}
}
} {
"data": {
"session": {
"id": "9cc55702-6c3e-491e-b259-e8c6982c6073",
"queueEntries": [
null,
null,
null
]
}
},
"errors": [
{
"message": "Fake Error",
"locations": [
{
"line": 9,
"column": 7
}
],
"path": [
"session",
"queueEntries",
"session"
]
},
{
"message": "Fake Error",
"locations": [
{
"line": 9,
"column": 7
}
],
"path": [
"session",
"queueEntries",
"session"
]
},
{
"message": "Fake Error",
"locations": [
{
"line": 9,
"column": 7
}
],
"path": [
"session",
"queueEntries",
"session"
]
}
]
} I'm using the latest master commit bee88d4 |
Thanks for reporting and creating a test case for this! Cases where we deviate from the spec are serious issues, so please keep reporting these if you find more :) The non-nullable list issue should be resolved now, the test case you created passes on master. |
That patch has done the trick! thanks again |
The spec says:
This is not the current behaviour. Currently the
null
does not "bubble up". As a result, a field that was declaredNon-Null
will return anull
when that field produces an error.The text was updated successfully, but these errors were encountered: