From 4b8bbdd2fe0d5187da3f355e4450b2dba13cb109 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 25 Jan 2024 10:19:56 +0100 Subject: [PATCH 1/3] Be strict about error paths --- spec/Section 7 -- Response.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/Section 7 -- Response.md b/spec/Section 7 -- Response.md index 8dcd9234c..9587f3de4 100644 --- a/spec/Section 7 -- Response.md +++ b/spec/Section 7 -- Response.md @@ -109,12 +109,12 @@ must contain an entry with the key `path` that details the path of the response field which experienced the error. This allows clients to identify whether a `null` result is intentional or caused by a runtime error. -This field should be a list of path segments starting at the root of the -response and ending with the field associated with the error. Path segments that -represent fields should be strings, and path segments that represent list -indices should be 0-indexed integers. If the error happens in an aliased field, -the path to the error should use the aliased name, since it represents a path in -the response, not in the request. +This field must be a list of path segments starting at the root of the response +and ending with the field associated with the error. Path segments that +represent fields must be strings, and path segments that represent list indices +must be 0-indexed integers. If the error happens in an aliased field, the path +to the error must use the aliased name, since it represents a path in the +response, not in the request. For example, if fetching one of the friends' names fails in the following operation: From 2866095621135839efeef20ff9f5f835b8a3d6ac Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 1 Feb 2024 20:18:14 +0100 Subject: [PATCH 2/3] Update spec/Section 7 -- Response.md Co-authored-by: Benjie --- spec/Section 7 -- Response.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/Section 7 -- Response.md b/spec/Section 7 -- Response.md index 9587f3de4..91f22308c 100644 --- a/spec/Section 7 -- Response.md +++ b/spec/Section 7 -- Response.md @@ -109,7 +109,7 @@ must contain an entry with the key `path` that details the path of the response field which experienced the error. This allows clients to identify whether a `null` result is intentional or caused by a runtime error. -This field must be a list of path segments starting at the root of the response +If present, this field must be a list of path segments starting at the root of the response and ending with the field associated with the error. Path segments that represent fields must be strings, and path segments that represent list indices must be 0-indexed integers. If the error happens in an aliased field, the path From 88d99e550b39c29c611989928fd53c9407d1d00b Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Thu, 1 Feb 2024 20:20:49 +0100 Subject: [PATCH 3/3] format --- spec/Section 7 -- Response.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/Section 7 -- Response.md b/spec/Section 7 -- Response.md index 91f22308c..12c31cac6 100644 --- a/spec/Section 7 -- Response.md +++ b/spec/Section 7 -- Response.md @@ -109,12 +109,12 @@ must contain an entry with the key `path` that details the path of the response field which experienced the error. This allows clients to identify whether a `null` result is intentional or caused by a runtime error. -If present, this field must be a list of path segments starting at the root of the response -and ending with the field associated with the error. Path segments that -represent fields must be strings, and path segments that represent list indices -must be 0-indexed integers. If the error happens in an aliased field, the path -to the error must use the aliased name, since it represents a path in the -response, not in the request. +If present, this field must be a list of path segments starting at the root of +the response and ending with the field associated with the error. Path segments +that represent fields must be strings, and path segments that represent list +indices must be 0-indexed integers. If the error happens in an aliased field, +the path to the error must use the aliased name, since it represents a path in +the response, not in the request. For example, if fetching one of the friends' names fails in the following operation: