Basic schema import code

This commit is contained in:
Kiana Sheibani 2023-08-26 17:43:01 -04:00
parent 4dc2975d03
commit 654efe2b6f
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
3 changed files with 2575 additions and 13 deletions

7
schema/build.rs Normal file
View file

@ -0,0 +1,7 @@
fn main() {
cynic_codegen::register_schema("startgg")
.from_sdl_file("src/startgg.graphql")
.unwrap()
.as_default()
.unwrap();
}

View file

@ -1,14 +1,3 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)] #[cynic::schema("startgg")]
mod tests { mod schema {}
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

2566
schema/src/startgg.graphql Normal file

File diff suppressed because it is too large Load diff