Skip to content

Commit 832e27c

Browse files
gabotechsgabotechs
authored andcommitted
chore: add test
1 parent 1295b31 commit 832e27c

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

graphqxl_transpiler/src/resolve_modified_ref.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use crate::resolve_expandable_ref::resolve_expandable_ref;
2+
use crate::utils::BlockDefStore;
23
use graphqxl_parser::{
34
BlockDef, BlockField, Directive, Implements, ModifiedRef, OwnedSpan, ValueType,
45
};
56
use std::error::Error;
67
use std::ops::Deref;
7-
use crate::utils::BlockDefStore;
88

99
#[derive(Debug, Clone, PartialEq)]
1010
pub(crate) struct ResolvedRef {
@@ -22,7 +22,7 @@ impl ResolvedRef {
2222
implements: value.implements.clone(),
2323
description: value.description.clone(),
2424
fields: vec![],
25-
directives: value.directives.clone()
25+
directives: value.directives.clone(),
2626
}
2727
}
2828
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"${{ custom.foo }}"
2+
type Type {
3+
field: Int!
4+
}
5+
6+
${foo: "description"}
7+
type Generic<T> {
8+
field: T!
9+
}
10+
11+
${bad: ""}
12+
type OtherType = Generic<Type>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Could not transpile graphqxl spec:
2+
3+
--> 1:1
4+
|
5+
1 | "${{ custom.foo }}"
6+
| ...
7+
4 | }␊
8+
| ^
9+
|
10+
= :1 Not all the template variables where resolved

0 commit comments

Comments
 (0)