Skip to content

Remove nullableBoundary LP; replace with executable boundaries #2391

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

Draft
wants to merge 170 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
6139c09
Move @dataplan/pg over to using runtime orderBy values
benjie Jan 29, 2025
b3889ca
Don't add orders in aggregate mode
benjie Jan 29, 2025
5b3cd29
Refactor
benjie Jan 29, 2025
e5416db
Even better refactoring
benjie Jan 29, 2025
f50f1d5
Give display names
benjie Jan 29, 2025
2f7cb12
Update plan diagrams
benjie Jan 29, 2025
b016060
Promote and refactor extractEnumExtensionValue
benjie Jan 29, 2025
0215963
Move autogenerated schema over to evaluating orderBy at runtime
benjie Jan 29, 2025
65e8d70
Update makeAddPgTableOrderByPlugin to use runtime query builder
benjie Jan 29, 2025
80d8005
Can.
benjie Jan 29, 2025
6a0b873
Add missing optional chaining
benjie Jan 29, 2025
3fcfcde
Update plan diagrams
benjie Jan 29, 2025
ae285b3
Update snapshots
benjie Feb 4, 2025
030cffb
Update snapshots
benjie Feb 4, 2025
17c1e37
Don't apply orders in aggregate mode
benjie Jan 29, 2025
8b19a26
Lint
benjie Jan 29, 2025
20957cd
Improve naming of exports
benjie Feb 4, 2025
31a125a
Update snapshots with improved names
benjie Feb 4, 2025
eafa742
Simplify vulns SQL
benjie Feb 4, 2025
ad7a823
docs(changeset): Move handling of orderBy to runtime from plantime.
benjie Feb 4, 2025
703be74
Lint
benjie Feb 5, 2025
066c478
Don't depend on graphql directly
benjie Feb 5, 2025
a86834e
Move applies back inside grafast
benjie Feb 11, 2025
ff491fc
Update snapshots
benjie Feb 11, 2025
fe1c669
Combine pgSelectApply and pgUnionAllApply into just 'apply'
benjie Feb 11, 2025
ae09ba6
Reduce function allocations
benjie Feb 11, 2025
8d82dcd
Update snapshots
benjie Feb 11, 2025
c482a00
Update snapshots after rebase
benjie Feb 24, 2025
cff3c9b
Beginning of work moving to runtime application of inputs
benjie Feb 11, 2025
0b3fd04
Auto apply arguments if they have applyPlan/applySubscribePlan methods
benjie Feb 11, 2025
cc8dcc7
Modifiers mutex
benjie Feb 11, 2025
3b84848
Remove FieldArgs.get
benjie Feb 11, 2025
82ef5f1
And it goes a little something like this... 🎶
benjie Feb 11, 2025
2dbf65d
Make latest changes consistent
benjie Feb 11, 2025
9a6aa70
Remove autoApply properties from types
benjie Feb 12, 2025
99acf55
Tidy up comments around ModifierStep
benjie Feb 12, 2025
46fcd4b
Update pgCondition to be a modifier
benjie Feb 12, 2025
371c7fc
Website is out of date
benjie Feb 12, 2025
66b7925
Fix export plugin
benjie Feb 12, 2025
c1459fb
Update other filter-related steps to be modifiers
benjie Feb 12, 2025
117089b
Pass parent into input configs for apply method
benjie Feb 12, 2025
7b47b22
Input object field might receive any input value
benjie Feb 12, 2025
0385074
Allow fieldArgs.apply to accept a getter to scope an apply
benjie Feb 12, 2025
0131015
Some changes missed from previous commits
benjie Feb 12, 2025
59a8fb5
This order matches the placeholder syntax, easier to migrate to
benjie Feb 12, 2025
0cd39bf
Update exampleSchema and a few other files
benjie Feb 12, 2025
cbf55b3
Fix bug in grafast tests
benjie Feb 12, 2025
7010fb5
Make TypeScript pass for @dataplan/pg
benjie Feb 12, 2025
d6cf7fc
Fix applyInput logic
benjie Feb 12, 2025
5a8138f
Fix bug in exampleSchema
benjie Feb 12, 2025
e3b05b6
Remove incorrect constraint
benjie Feb 12, 2025
bc25429
Fix insert/update steps to compile at runtime
benjie Feb 12, 2025
0586f66
Update snapshots
benjie Feb 12, 2025
f589137
Missing import
benjie Feb 12, 2025
820a40a
Fix types across graphile-build
benjie Feb 12, 2025
dba4301
inputPlan -> baked
benjie Feb 12, 2025
390511a
pgInsertSingle now yields an object and supports apply/queryBuilder p…
benjie Feb 14, 2025
efbdc8f
Extend apply+meta support to update/delete
benjie Feb 14, 2025
997202e
Update plan diagrams
benjie Feb 14, 2025
55cf56f
getMeta support on update/delete
benjie Feb 14, 2025
b7b2d8e
Update types
benjie Feb 14, 2025
c54b8fa
Migrate CRUD plugins
benjie Feb 14, 2025
274b645
FieldArgs convenience method to get input type at given path
benjie Feb 14, 2025
18f5523
args.get -> args.getRaw
benjie Feb 14, 2025
a8dc455
Allow for decoding nodeIds at runtime too
benjie Feb 17, 2025
04c8edb
Make setMeta universal for all query builders
benjie Feb 17, 2025
10fe3f0
Allow reading meta from all the various places
benjie Feb 17, 2025
347337c
Types are passing (but it's almost certainly still broken)
benjie Feb 17, 2025
64192ca
Fix types in graphile-utils
benjie Feb 17, 2025
f0149db
bakedInput is sync and safe
benjie Feb 17, 2025
a2d4288
Ability to filter which snapshots get updated
benjie Feb 17, 2025
00dd53e
Fix error reporting in postgraphile tests
benjie Feb 17, 2025
ead9785
Fix some issues around applyInput/bakedInput
benjie Feb 17, 2025
1450368
Fix accessing meta key
benjie Feb 17, 2025
8cefe3e
Maybe fix baked input who knows
benjie Feb 17, 2025
221c853
Fix typo
benjie Feb 17, 2025
8c164d5
Introduce new createObjectAndApplyChildren function
benjie Feb 17, 2025
d27479b
Solve fall-through issue with a return and an else
benjie Feb 18, 2025
91b2e05
Move limiting to types to runtime
benjie Feb 18, 2025
e2860f8
Make limitToTypes function pure
benjie Feb 18, 2025
9a100e8
Fix types throughout, differentiate FieldArgs from FieldArg, etc
benjie Feb 18, 2025
28fe8c9
Improve error reporting in test
benjie Feb 18, 2025
f6315da
Restore te getSpec plan
benjie Feb 18, 2025
aa42f69
Simplify getIdentifiers
benjie Feb 18, 2025
02dff10
Fix more types
benjie Feb 18, 2025
95627a2
Update mermaid plan diagrams
benjie Feb 18, 2025
e0c6e3c
Export schema export snapshots
benjie Feb 18, 2025
ebb960e
Add approved SQL changes
benjie Feb 18, 2025
c926d86
Add SQL differences from branch in query planning
benjie Feb 18, 2025
66ca300
Allow deduplication of applyInput and bakedInput
benjie Feb 18, 2025
dee7f79
Avoid inline functions which break deduplication
benjie Feb 18, 2025
fa92d6f
Update snapshots with re-simplified query plan/SQL
benjie Feb 18, 2025
3957f42
Update plans with applyPlan dedupe
benjie Feb 18, 2025
3a346b1
Skip applying input if value is known to be undefined in document
benjie Feb 18, 2025
16dad84
Fix exporting steps
benjie Feb 18, 2025
09715a6
Update snapshots with latest change
benjie Feb 18, 2025
846a113
Move orderBy back to applyPlan; use inputApply
benjie Feb 18, 2025
5e4cd40
Remove need for extractEnumExtensionValue
benjie Feb 18, 2025
b3bce13
Update plan diagrams now that extractEnumExtensionValue has been removed
benjie Feb 18, 2025
9b1502a
Allow applyInput to run at planTime on constant input
benjie Feb 18, 2025
0230217
Have PgSelect implement PgSelectQueryBuilder
benjie Feb 18, 2025
b8228eb
Refactor optimize method
benjie Feb 18, 2025
0ea2304
Update plan snapshot
benjie Feb 18, 2025
a034c85
Enable applyInput to bypass the step entirely if called on a constant
benjie Feb 18, 2025
0b2c3b2
If apply with a constant; apply now.
benjie Feb 18, 2025
0bbb4d3
Update plan diagrams with constant-ified applyInput
benjie Feb 18, 2025
c3cfb20
Get rid of InputStep type and use AnyInputStep instead
benjie Feb 18, 2025
bbffc5c
Allow AnyInputStep to be any constant, not just undefined
benjie Feb 18, 2025
030fb44
Use constants earlier in inputs
benjie Feb 18, 2025
08c9fe9
Remove sneaky log
benjie Feb 18, 2025
372f6cb
Update plan diagrams now input plans are deduped
benjie Feb 18, 2025
a6324f4
New test with results ran on main
benjie Feb 19, 2025
3749545
Add tests so we can track the difference between plan-time and run-ti…
benjie Feb 19, 2025
d2c8d55
Remove the postPlanResolvers / addToPlanResolver system - use arg app…
benjie Feb 19, 2025
aa0b915
Fix name of function
benjie Feb 19, 2025
79023dd
Update snapshot
benjie Feb 19, 2025
fdcde09
Throw an error if applyPlan on an argument returns a value
benjie Feb 19, 2025
8136112
Placeholder page for applyInput
benjie Feb 24, 2025
0222834
Don't return values from applyPlan
benjie Feb 19, 2025
aa1a064
Update snapshots after rebase
benjie Feb 24, 2025
b7fc278
Update snapshots after rebase
benjie Feb 24, 2025
8e0205f
Lint and remove context from more types
benjie Feb 24, 2025
4949109
Fix a missing exportable
benjie Feb 24, 2025
e7ed8e5
Rename ExecutableStep to Step and get rid of BaseStep
benjie Feb 19, 2025
5e79b40
TypeScript refactor, rename ExecutableStep to step
benjie Feb 19, 2025
f4cf029
Yet more renaming and stuff
benjie Feb 19, 2025
188291e
Yet more ExecutableStep -> Step changes
benjie Feb 19, 2025
331cd4f
UnbatchedExecutableStep -> UnbatchedStep
benjie Feb 19, 2025
d193b9d
PgTypedExecutableStep -> PgTypedStep
benjie Feb 19, 2025
3b69a63
Cannot double-export
benjie Feb 19, 2025
7480b63
No need for old isUnbatchedExecutableStep
benjie Feb 19, 2025
2f35b29
Lint autofix
benjie Feb 24, 2025
04efd1b
Do not eval cursors
benjie Feb 19, 2025
7c7e494
Update query plan impacted by cursor changes
benjie Feb 19, 2025
dd31b11
Remove another unnecessary eval
benjie Feb 19, 2025
ab85791
Update snapshots due to removed eval
benjie Feb 19, 2025
236a0da
TODO
benjie Feb 19, 2025
ed3b753
Update snapshots after rebase
benjie Feb 24, 2025
7e4890b
Mermaid tweak: don't render multiple lines for the same dependency/de…
benjie Feb 19, 2025
86318f4
Mermaid tweak: don't render constant<undefined>
benjie Feb 19, 2025
5680d4b
Mermaid tweaks: simplify mermaid diagrams
benjie Feb 19, 2025
dbdfd65
Update snapshots after rebase
benjie Feb 24, 2025
3d9fd20
Move postgres argument logic to runtime
benjie Feb 21, 2025
616ad63
Move SQL argument calculations to runtime
benjie Feb 21, 2025
9d3869d
Infer parameters if missing
benjie Feb 21, 2025
a101689
Fix arguments
benjie Feb 21, 2025
330c62c
Optimize export output
benjie Feb 21, 2025
6437853
Update export snapshots
benjie Feb 21, 2025
470c8c2
Update query plans
benjie Feb 21, 2025
0244029
If it's just placeholders, inline it.
benjie Feb 21, 2025
f8a031a
Allowed SQL changes
benjie Feb 21, 2025
c538e35
Dedupe logic
benjie Feb 21, 2025
7fe2d7a
Fix dedupe in pgSelect
benjie Feb 21, 2025
b6f1dd2
arraysMatch should always do equality check
benjie Feb 21, 2025
963ab69
Branch just the once
benjie Feb 21, 2025
480cc6a
Update query plans again
benjie Feb 21, 2025
1b692bf
Lint
benjie Feb 21, 2025
8210f93
Update more plans
benjie Feb 24, 2025
d06e474
Mark all eval methods as internal
benjie Feb 25, 2025
3a385cd
Completely remove the concept of a nullable boundary
benjie Feb 25, 2025
7179f46
Add new $$isNullableBoundary to change flags on dependencies
benjie Feb 25, 2025
8dfe5bc
TODO
benjie Feb 25, 2025
f12c3a0
Update plans now there's no nullableBoundary
benjie Feb 25, 2025
c354e3e
Don't use getDep from OutputPlan
benjie Feb 25, 2025
d4e8d27
Log statement to aid debugging
benjie Feb 25, 2025
d9d1ffc
Be more explicit about types around __FlagStep and access underlying …
benjie Feb 25, 2025
0c1efc5
Stricter typings, allow default flags
benjie Feb 25, 2025
cf0a7cd
Update mermaid diagrams
benjie Feb 25, 2025
5a2fcf5
Update SQL snapshots
benjie Feb 25, 2025
8f13f4f
Mark properties internal
benjie Feb 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .changeset/violet-jars-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"graphile-build": patch
"graphile-build-pg": patch
"postgraphile": patch
"@dataplan/pg": patch
---

Start migrating away from `applyPlan`/`inputPlan`, when adding an argument to a
field you can now augment the field's plan resolver via
`context.addToPlanResolver` hook. Use this and other changes to move handling of
orderBy to runtime from plantime.
10 changes: 4 additions & 6 deletions grafast/dataplan-json/src/steps/jsonParse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
GrafastResultsList,
PromiseOrDirect,
} from "grafast";
import { access, ExecutableStep, exportAs } from "grafast";
import { access, exportAs, Step } from "grafast";

export type JSONValue =
| string
Expand All @@ -19,9 +19,7 @@ export type JSONValue =
* This plan accepts as JSON string as its only input and will result in the
* parsed JSON object (or array, boolean, string, etc).
*/
export class JSONParseStep<
TJSON extends JSONValue,
> extends ExecutableStep<TJSON> {
export class JSONParseStep<TJSON extends JSONValue> extends Step<TJSON> {
static $$export = {
moduleName: "@dataplan/json",
exportName: "JSONParseStep",
Expand All @@ -30,7 +28,7 @@ export class JSONParseStep<
// promise.
isSyncAndSafe = false;

constructor($stringPlan: ExecutableStep<string | null>) {
constructor($stringPlan: Step<string | null>) {
super();
this.addDependency($stringPlan);
}
Expand Down Expand Up @@ -85,7 +83,7 @@ export class JSONParseStep<
* parsed JSON object (or array, boolean, string, etc).
*/
export function jsonParse<TJSON extends JSONValue>(
$string: ExecutableStep<string | null>,
$string: Step<string | null>,
): JSONParseStep<TJSON> {
return new JSONParseStep<TJSON>($string);
}
Expand Down
15 changes: 13 additions & 2 deletions grafast/dataplan-pg/__tests__/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,19 @@ import {
* We go beyond what Jest snapshots allow; so we have to manage it ourselves.
* If UPDATE_SNAPSHOTS is set then we'll write updated snapshots, otherwise
* we'll do the default behaviour of comparing to existing snapshots.
*
* Set UPDATE_SNAPSHOTS=1 to update all snapshots. Alternatively, set it to a
* comma separated list of snapshot types to update.
*/
export const UPDATE_SNAPSHOTS = process.env.UPDATE_SNAPSHOTS === "1";
const { UPDATE_SNAPSHOTS } = process.env;
const updateSnapshotExtensions = UPDATE_SNAPSHOTS?.split(",");
function shouldUpdateSnapshot(filePath: string) {
// Never update snapshots in CI
if (process.env.CI) return false;
if (UPDATE_SNAPSHOTS === "1") return true;
if (!updateSnapshotExtensions) return false;
return updateSnapshotExtensions.some((e) => filePath.endsWith(e));
}

const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

Expand Down Expand Up @@ -391,7 +402,7 @@ async function snapshot(actual: string, filePath: string) {
} catch (e) {
/* noop */
}
if (expected == null || UPDATE_SNAPSHOTS) {
if (expected == null || shouldUpdateSnapshot(filePath)) {
if (expected !== actual) {
console.warn(`Updated snapshot in '${filePath}'`);
await fsp.writeFile(filePath, actual);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,35 @@ graph TD
Constant11{{"Constant[11∈0] ➊<br />ᐸ2ᐳ"}}:::plan
Constant34{{"Constant[34∈0] ➊<br />ᐸ'My Relational Post'ᐳ"}}:::plan
Constant35{{"Constant[35∈0] ➊<br />ᐸ'Such a great post.'ᐳ"}}:::plan
PgInsertSingle17[["PgInsertSingle[17∈1] ➊<br />ᐸrelational_posts(id,title,note)ᐳ"]]:::sideeffectplan
PgInsertSingle18[["PgInsertSingle[18∈1] ➊<br />ᐸrelational_posts(id,title,description,note)ᐳ"]]:::sideeffectplan
PgClassExpression16{{"PgClassExpression[16∈1] ➊<br />ᐸ__relation...ems__.”id”ᐳ"}}:::plan
Object15 & PgClassExpression16 & Constant34 & Constant35 --> PgInsertSingle17
Object15 & PgClassExpression16 & Constant34 & Constant35 --> PgInsertSingle18
PgInsertSingle12[["PgInsertSingle[12∈1] ➊<br />ᐸrelational_items(type,author_id)ᐳ"]]:::sideeffectplan
Object15 & Constant10 & Constant11 --> PgInsertSingle12
PgInsertSingle12 --> PgClassExpression16
PgClassExpression21{{"PgClassExpression[21∈1] ➊<br />ᐸ__relational_posts__ᐳ"}}:::plan
PgInsertSingle17 --> PgClassExpression21
PgSelect23[["PgSelect[23∈2] ➊<br />ᐸrelational_postsᐳ"]]:::plan
PgClassExpression22{{"PgClassExpression[22∈2] ➊<br />ᐸ(__relatio...ts__).”id”ᐳ"}}:::plan
Object15 & PgClassExpression22 --> PgSelect23
PgInsertSingle17 --> PgClassExpression22
First27{{"First[27∈2] ➊"}}:::plan
PgSelectRows28[["PgSelectRows[28∈2] ➊"]]:::plan
PgSelect25[["PgSelect[25∈1] ➊<br />ᐸrelational_postsᐳ"]]:::plan
PgClassExpression24{{"PgClassExpression[24∈1] ➊<br />ᐸ(__relatio...ts__).”id”ᐳ"}}:::plan
Object15 & PgClassExpression24 --> PgSelect25
Access17{{"Access[17∈1] ➊<br />ᐸ12.tᐳ"}}:::plan
Access17 --> PgClassExpression16
PgInsertSingle12 --> Access17
PgClassExpression22{{"PgClassExpression[22∈1] ➊<br />ᐸ__relational_posts__ᐳ"}}:::plan
Access23{{"Access[23∈1] ➊<br />ᐸ18.tᐳ"}}:::plan
Access23 --> PgClassExpression22
PgInsertSingle18 --> Access23
Access23 --> PgClassExpression24
First27{{"First[27∈1] ➊"}}:::plan
PgSelectRows28[["PgSelectRows[28∈1] ➊"]]:::plan
PgSelectRows28 --> First27
PgSelect23 --> PgSelectRows28
PgSelectSingle29{{"PgSelectSingle[29∈2] ➊<br />ᐸrelational_postsᐳ"}}:::plan
PgSelect25 --> PgSelectRows28
PgSelectSingle29{{"PgSelectSingle[29∈1] ➊<br />ᐸrelational_postsᐳ"}}:::plan
First27 --> PgSelectSingle29
PgClassExpression30{{"PgClassExpression[30∈3] ➊<br />ᐸ__relation...sts__.”id”ᐳ"}}:::plan
PgClassExpression30{{"PgClassExpression[30∈1] ➊<br />ᐸ__relation...sts__.”id”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression30
PgClassExpression31{{"PgClassExpression[31∈3] ➊<br />ᐸ__relation...__.”title”ᐳ"}}:::plan
PgClassExpression31{{"PgClassExpression[31∈1] ➊<br />ᐸ__relation...__.”title”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression31
PgClassExpression32{{"PgClassExpression[32∈3] ➊<br />ᐸ__relation...scription”ᐳ"}}:::plan
PgClassExpression32{{"PgClassExpression[32∈1] ➊<br />ᐸ__relation...scription”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression32
PgClassExpression33{{"PgClassExpression[33∈3] ➊<br />ᐸ__relation...s__.”note”ᐳ"}}:::plan
PgClassExpression33{{"PgClassExpression[33∈1] ➊<br />ᐸ__relation...s__.”note”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression33

%% define steps
Expand All @@ -54,16 +58,8 @@ graph TD
Bucket0("Bucket 0 (root)"):::bucket
classDef bucket0 stroke:#696969
class Bucket0,__Value2,__Value4,Constant10,Constant11,Access13,Access14,Object15,Constant34,Constant35 bucket0
Bucket1("Bucket 1 (mutationField)<br />Deps: 15, 10, 11, 34, 35<br /><br />1: PgInsertSingle[12]<br />2: PgClassExpression[16]<br />3: PgInsertSingle[17]<br />4: <br />ᐳ: PgClassExpression[21]"):::bucket
Bucket1("Bucket 1 (mutationField)<br />Deps: 15, 10, 11, 34, 8, 35<br /><br />1: PgInsertSingle[12]<br />2: Access[17]<br />3: PgClassExpression[16]<br />4: PgInsertSingle[18]<br />5: <br />ᐳ: 23, 22, 24<br />6: PgSelect[25]<br />7: PgSelectRows[28]<br />ᐳ: 27, 29, 30, 31, 32, 33"):::bucket
classDef bucket1 stroke:#00bfff
class Bucket1,PgInsertSingle12,PgClassExpression16,PgInsertSingle17,PgClassExpression21 bucket1
Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 17, 15, 21<br /><br />ROOT PgClassExpression{1}ᐸ__relational_posts__ᐳ[21]<br />1: <br />ᐳ: PgClassExpression[22]<br />2: PgSelect[23]<br />3: PgSelectRows[28]<br />ᐳ: First[27], PgSelectSingle[29]"):::bucket
classDef bucket2 stroke:#7f007f
class Bucket2,PgClassExpression22,PgSelect23,First27,PgSelectRows28,PgSelectSingle29 bucket2
Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 29<br /><br />ROOT PgSelectSingle{2}ᐸrelational_postsᐳ[29]"):::bucket
classDef bucket3 stroke:#ffa500
class Bucket3,PgClassExpression30,PgClassExpression31,PgClassExpression32,PgClassExpression33 bucket3
class Bucket1,PgInsertSingle12,PgClassExpression16,Access17,PgInsertSingle18,PgClassExpression22,Access23,PgClassExpression24,PgSelect25,First27,PgSelectRows28,PgSelectSingle29,PgClassExpression30,PgClassExpression31,PgClassExpression32,PgClassExpression33 bucket1
Bucket0 --> Bucket1
Bucket1 --> Bucket2
Bucket2 --> Bucket3
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,35 @@ graph TD
Constant11{{"Constant[11∈0] ➊<br />ᐸ2ᐳ"}}:::plan
Constant34{{"Constant[34∈0] ➊<br />ᐸ'My Relational Post'ᐳ"}}:::plan
Constant35{{"Constant[35∈0] ➊<br />ᐸ'Such a great post.'ᐳ"}}:::plan
PgInsertSingle17[["PgInsertSingle[17∈1] ➊<br />ᐸrelational_posts(id,title,note)ᐳ"]]:::sideeffectplan
PgInsertSingle18[["PgInsertSingle[18∈1] ➊<br />ᐸrelational_posts(id,title,description,note)ᐳ"]]:::sideeffectplan
PgClassExpression16{{"PgClassExpression[16∈1] ➊<br />ᐸ__relation...ems__.”id”ᐳ"}}:::plan
Object15 & PgClassExpression16 & Constant34 & Constant35 --> PgInsertSingle17
Object15 & PgClassExpression16 & Constant34 & Constant35 --> PgInsertSingle18
PgInsertSingle12[["PgInsertSingle[12∈1] ➊<br />ᐸrelational_items(type,author_id)ᐳ"]]:::sideeffectplan
Object15 & Constant10 & Constant11 --> PgInsertSingle12
PgInsertSingle12 --> PgClassExpression16
PgClassExpression21{{"PgClassExpression[21∈1] ➊<br />ᐸ__relational_posts__ᐳ"}}:::plan
PgInsertSingle17 --> PgClassExpression21
PgSelect23[["PgSelect[23∈2] ➊<br />ᐸrelational_postsᐳ"]]:::plan
PgClassExpression22{{"PgClassExpression[22∈2] ➊<br />ᐸ(__relatio...ts__).”id”ᐳ"}}:::plan
Object15 & PgClassExpression22 --> PgSelect23
PgInsertSingle17 --> PgClassExpression22
First27{{"First[27∈2] ➊"}}:::plan
PgSelectRows28[["PgSelectRows[28∈2] ➊"]]:::plan
PgSelect25[["PgSelect[25∈1] ➊<br />ᐸrelational_postsᐳ"]]:::plan
PgClassExpression24{{"PgClassExpression[24∈1] ➊<br />ᐸ(__relatio...ts__).”id”ᐳ"}}:::plan
Object15 & PgClassExpression24 --> PgSelect25
Access17{{"Access[17∈1] ➊<br />ᐸ12.tᐳ"}}:::plan
Access17 --> PgClassExpression16
PgInsertSingle12 --> Access17
PgClassExpression22{{"PgClassExpression[22∈1] ➊<br />ᐸ__relational_posts__ᐳ"}}:::plan
Access23{{"Access[23∈1] ➊<br />ᐸ18.tᐳ"}}:::plan
Access23 --> PgClassExpression22
PgInsertSingle18 --> Access23
Access23 --> PgClassExpression24
First27{{"First[27∈1] ➊"}}:::plan
PgSelectRows28[["PgSelectRows[28∈1] ➊"]]:::plan
PgSelectRows28 --> First27
PgSelect23 --> PgSelectRows28
PgSelectSingle29{{"PgSelectSingle[29∈2] ➊<br />ᐸrelational_postsᐳ"}}:::plan
PgSelect25 --> PgSelectRows28
PgSelectSingle29{{"PgSelectSingle[29∈1] ➊<br />ᐸrelational_postsᐳ"}}:::plan
First27 --> PgSelectSingle29
PgClassExpression30{{"PgClassExpression[30∈3] ➊<br />ᐸ__relation...sts__.”id”ᐳ"}}:::plan
PgClassExpression30{{"PgClassExpression[30∈1] ➊<br />ᐸ__relation...sts__.”id”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression30
PgClassExpression31{{"PgClassExpression[31∈3] ➊<br />ᐸ__relation...__.”title”ᐳ"}}:::plan
PgClassExpression31{{"PgClassExpression[31∈1] ➊<br />ᐸ__relation...__.”title”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression31
PgClassExpression32{{"PgClassExpression[32∈3] ➊<br />ᐸ__relation...scription”ᐳ"}}:::plan
PgClassExpression32{{"PgClassExpression[32∈1] ➊<br />ᐸ__relation...scription”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression32
PgClassExpression33{{"PgClassExpression[33∈3] ➊<br />ᐸ__relation...s__.”note”ᐳ"}}:::plan
PgClassExpression33{{"PgClassExpression[33∈1] ➊<br />ᐸ__relation...s__.”note”ᐳ"}}:::plan
PgSelectSingle29 --> PgClassExpression33

%% define steps
Expand All @@ -54,16 +58,8 @@ graph TD
Bucket0("Bucket 0 (root)"):::bucket
classDef bucket0 stroke:#696969
class Bucket0,__Value2,__Value4,Constant10,Constant11,Access13,Access14,Object15,Constant34,Constant35 bucket0
Bucket1("Bucket 1 (mutationField)<br />Deps: 15, 10, 11, 34, 35<br /><br />1: PgInsertSingle[12]<br />2: PgClassExpression[16]<br />3: PgInsertSingle[17]<br />4: <br />ᐳ: PgClassExpression[21]"):::bucket
Bucket1("Bucket 1 (mutationField)<br />Deps: 15, 10, 11, 34, 8, 35<br /><br />1: PgInsertSingle[12]<br />2: Access[17]<br />3: PgClassExpression[16]<br />4: PgInsertSingle[18]<br />5: <br />ᐳ: 23, 22, 24<br />6: PgSelect[25]<br />7: PgSelectRows[28]<br />ᐳ: 27, 29, 30, 31, 32, 33"):::bucket
classDef bucket1 stroke:#00bfff
class Bucket1,PgInsertSingle12,PgClassExpression16,PgInsertSingle17,PgClassExpression21 bucket1
Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 17, 15, 21<br /><br />ROOT PgClassExpression{1}ᐸ__relational_posts__ᐳ[21]<br />1: <br />ᐳ: PgClassExpression[22]<br />2: PgSelect[23]<br />3: PgSelectRows[28]<br />ᐳ: First[27], PgSelectSingle[29]"):::bucket
classDef bucket2 stroke:#7f007f
class Bucket2,PgClassExpression22,PgSelect23,First27,PgSelectRows28,PgSelectSingle29 bucket2
Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 29<br /><br />ROOT PgSelectSingle{2}ᐸrelational_postsᐳ[29]"):::bucket
classDef bucket3 stroke:#ffa500
class Bucket3,PgClassExpression30,PgClassExpression31,PgClassExpression32,PgClassExpression33 bucket3
class Bucket1,PgInsertSingle12,PgClassExpression16,Access17,PgInsertSingle18,PgClassExpression22,Access23,PgClassExpression24,PgSelect25,First27,PgSelectRows28,PgSelectSingle29,PgClassExpression30,PgClassExpression31,PgClassExpression32,PgClassExpression33 bucket1
Bucket0 --> Bucket1
Bucket1 --> Bucket2
Bucket2 --> Bucket3
end
Loading
Loading