-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9e037e
commit 4213e1b
Showing
6 changed files
with
95 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ fn test_query() -> Result<(), anyhow::Error> { | |
"[email protected]", | ||
"query", | ||
"get package that doesn't exist" => "query { package(name: \"doesnotexist\") { path } }", | ||
"get packages with less than 1 dependents" => "query { packages(filter: {lessThan: {field: DIRECT_DEPENDENT_COUNT, value: 1}}) { items { name directDependents { length } } } }", | ||
"get packages with more than 0 dependents" => "query { packages(filter: {greaterThan: {field: DIRECT_DEPENDENT_COUNT, value: 0}}) { items { name directDependents { length } } } }", | ||
); | ||
|
||
Ok(()) | ||
|
30 changes: 30 additions & 0 deletions
30
...napshots/query__basic_monorepo_get_packages_with_less_than_1_dependents_([email protected]).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,30 @@ | ||
--- | ||
source: crates/turborepo/tests/query.rs | ||
expression: query_output | ||
--- | ||
{ | ||
"data": { | ||
"packages": { | ||
"items": [ | ||
{ | ||
"name": "//", | ||
"directDependents": { | ||
"length": 0 | ||
} | ||
}, | ||
{ | ||
"name": "another", | ||
"directDependents": { | ||
"length": 0 | ||
} | ||
}, | ||
{ | ||
"name": "my-app", | ||
"directDependents": { | ||
"length": 0 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...napshots/query__basic_monorepo_get_packages_with_less_than_2_dependents_([email protected]).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,36 @@ | ||
--- | ||
source: crates/turborepo/tests/query.rs | ||
expression: query_output | ||
--- | ||
{ | ||
"data": { | ||
"packages": { | ||
"items": [ | ||
{ | ||
"name": "//", | ||
"directDependents": { | ||
"length": 0 | ||
} | ||
}, | ||
{ | ||
"name": "another", | ||
"directDependents": { | ||
"length": 0 | ||
} | ||
}, | ||
{ | ||
"name": "my-app", | ||
"directDependents": { | ||
"length": 0 | ||
} | ||
}, | ||
{ | ||
"name": "util", | ||
"directDependents": { | ||
"length": 1 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...napshots/query__basic_monorepo_get_packages_with_more_than_0_dependents_([email protected]).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,18 @@ | ||
--- | ||
source: crates/turborepo/tests/query.rs | ||
expression: query_output | ||
--- | ||
{ | ||
"data": { | ||
"packages": { | ||
"items": [ | ||
{ | ||
"name": "util", | ||
"directDependents": { | ||
"length": 1 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |