Skip to content

Commit

Permalink
Folded condition
Browse files Browse the repository at this point in the history
  • Loading branch information
burner committed Jan 27, 2022
1 parent 3168735 commit 02f1d21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/graphql/helper.d
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,11 @@ Json toGraphqlJson(Schema,T)(auto ref T input) {
alias names = FieldNameTuple!(T);
alias types = FieldTypeTuple!(T);
static foreach(idx; 0 .. names.length) {{
static if(!names[idx].empty && getUdaData!(T, names[idx]).ignore !=
Ignore.yes) {
static if(is(types[idx] : NullableStore!Type, Type)) {
} else static if(is(types[idx] == enum)) {
static if(!names[idx].empty
&& getUdaData!(T, names[idx]).ignore != Ignore.yes
&& !is(types[idx] : NullableStore!Type, Type))
{
static if(is(types[idx] == enum)) {
ret[names[idx]] =
to!string(__traits(getMember, input, names[idx]));
} else {
Expand Down

0 comments on commit 02f1d21

Please sign in to comment.