-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove v2 prefix from mutation permissions
- Loading branch information
1 parent
25971a8
commit 60a96e6
Showing
26 changed files
with
315 additions
and
191 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
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
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
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
File renamed without changes.
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
File renamed without changes.
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
63 changes: 63 additions & 0 deletions
63
crates/query-engine/translation/tests/snapshots/tests__mutations__insert.snap
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,63 @@ | ||
--- | ||
source: crates/query-engine/translation/tests/tests.rs | ||
assertion_line: 414 | ||
expression: result | ||
--- | ||
BEGIN | ||
ISOLATION LEVEL READ COMMITTED READ WRITE; | ||
|
||
WITH "%0_generated_mutation" AS ( | ||
INSERT INTO | ||
"public"."Artist"("ArtistId", "Name") | ||
VALUES | ||
(276, cast($1 as "pg_catalog"."varchar")), | ||
(DEFAULT, cast($2 as "pg_catalog"."varchar")) RETURNING *, | ||
false AS "%check__constraint" | ||
) | ||
SELECT | ||
( | ||
SELECT | ||
json_build_object('result', row_to_json("%4_universe"), 'type', $3) AS "universe" | ||
FROM | ||
( | ||
SELECT | ||
* | ||
FROM | ||
( | ||
SELECT | ||
coalesce(json_agg(row_to_json("%5_returning")), '[]') AS "returning" | ||
FROM | ||
( | ||
SELECT | ||
"%1_Artist"."ArtistId" AS "artist_id", | ||
"%1_Artist"."Name" AS "name" | ||
FROM | ||
"%0_generated_mutation" AS "%1_Artist" | ||
) AS "%5_returning" | ||
) AS "%5_returning" | ||
CROSS JOIN ( | ||
SELECT | ||
COUNT(*) AS "affected_rows" | ||
FROM | ||
( | ||
SELECT | ||
"%2_Artist".* | ||
FROM | ||
"%0_generated_mutation" AS "%2_Artist" | ||
) AS "%3_Artist" | ||
) AS "%6_aggregates" | ||
) AS "%4_universe" | ||
) AS "%results", | ||
( | ||
SELECT | ||
coalesce( | ||
bool_and("%7_insert_Artist"."%check__constraint"), | ||
true | ||
) AS "%check__constraint" | ||
FROM | ||
"%0_generated_mutation" AS "%7_insert_Artist" | ||
) AS "%check__constraint"; | ||
|
||
COMMIT; | ||
|
||
[[(1, String("Olympians")), (2, String("The Other Band")), (3, String("procedure"))]] |
63 changes: 63 additions & 0 deletions
63
crates/query-engine/translation/tests/snapshots/tests__mutations__insert_empty_objects.snap
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,63 @@ | ||
--- | ||
source: crates/query-engine/translation/tests/tests.rs | ||
assertion_line: 423 | ||
expression: result | ||
--- | ||
BEGIN | ||
ISOLATION LEVEL READ COMMITTED READ WRITE; | ||
|
||
WITH "%0_generated_mutation" AS ( | ||
INSERT INTO | ||
"public"."Dog" | ||
SELECT | ||
FROM | ||
generate_series(1, 4) RETURNING *, | ||
true AS "%check__constraint" | ||
) | ||
SELECT | ||
( | ||
SELECT | ||
json_build_object('result', row_to_json("%4_universe"), 'type', $1) AS "universe" | ||
FROM | ||
( | ||
SELECT | ||
* | ||
FROM | ||
( | ||
SELECT | ||
coalesce(json_agg(row_to_json("%5_returning")), '[]') AS "returning" | ||
FROM | ||
( | ||
SELECT | ||
"%1_Dog"."id" AS "id", | ||
"%1_Dog"."adopter_name" AS "adopter_name" | ||
FROM | ||
"%0_generated_mutation" AS "%1_Dog" | ||
) AS "%5_returning" | ||
) AS "%5_returning" | ||
CROSS JOIN ( | ||
SELECT | ||
COUNT(*) AS "affected_rows" | ||
FROM | ||
( | ||
SELECT | ||
"%2_Dog".* | ||
FROM | ||
"%0_generated_mutation" AS "%2_Dog" | ||
) AS "%3_Dog" | ||
) AS "%6_aggregates" | ||
) AS "%4_universe" | ||
) AS "%results", | ||
( | ||
SELECT | ||
coalesce( | ||
bool_and("%7_insert_Dog"."%check__constraint"), | ||
true | ||
) AS "%check__constraint" | ||
FROM | ||
"%0_generated_mutation" AS "%7_insert_Dog" | ||
) AS "%check__constraint"; | ||
|
||
COMMIT; | ||
|
||
[[(1, String("procedure"))]] |
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
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
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
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
Oops, something went wrong.