-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow platform specific diffs in error message
- Loading branch information
Showing
4 changed files
with
32 additions
and
24 deletions.
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 |
---|---|---|
@@ -1,11 +1,20 @@ | ||
select graphql.resolve($$ | ||
{ { { | ||
shouldFail | ||
-- Platform specific diffs so we have to test the properties here rather than exact response | ||
with d(val) as ( | ||
select graphql.resolve($$ | ||
{ { { | ||
shouldFail | ||
} | ||
} | ||
} | ||
$$); | ||
resolve | ||
------------------------------------------------------------------------------------------------------------------- | ||
{"errors": [{"message": "query parse error: Parse error at 2:3\nUnexpected `{[Punctuator]`\nExpected `Name`\n"}]} | ||
$$)::json | ||
) | ||
select | ||
( | ||
json_typeof(val -> 'errors') = 'array' | ||
and json_array_length(val -> 'errors') = 1 | ||
) as is_valid | ||
from d; | ||
is_valid | ||
---------- | ||
t | ||
(1 row) | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,16 @@ | ||
select graphql.resolve($$ | ||
{ { { | ||
shouldFail | ||
-- Platform specific diffs so we have to test the properties here rather than exact response | ||
with d(val) as ( | ||
select graphql.resolve($$ | ||
{ { { | ||
shouldFail | ||
} | ||
} | ||
} | ||
$$); | ||
$$)::json | ||
) | ||
|
||
select | ||
( | ||
json_typeof(val -> 'errors') = 'array' | ||
and json_array_length(val -> 'errors') = 1 | ||
) as is_valid | ||
from d; |
This file was deleted.
Oops, something went wrong.