Skip to content

Commit

Permalink
fixing typeToGQLDType hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
burner committed Jun 15, 2021
1 parent 78c4007 commit 5dd537e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/graphql/schema/types.d
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,8 @@ string toShortString(const(GQLDType) e) {
}

GQLDType typeToGQLDType(TypeQ, SCH)(ref SCH ret) {
alias Type = Unqual!TypeQ;
alias TypeUQ = Unqual!TypeQ;
alias Type = TypeQ;
static if(is(Type == enum)) {
GQLDEnum r;
if(Type.stringof in ret.types) {
Expand All @@ -571,11 +572,11 @@ GQLDType typeToGQLDType(TypeQ, SCH)(ref SCH ret) {
ret.types[Type.stringof] = r;
}
return r;
} else static if(is(Type == bool)) {
} else static if(is(Type == bool) || is(TypeUQ == bool)) {
return new GQLDBool();
} else static if(isFloatingPoint!(Type)) {
} else static if(isFloatingPoint!(Type) || isFloatingPoint!(TypeUQ)) {
return new GQLDFloat();
} else static if(isIntegral!(Type)) {
} else static if(isIntegral!(Type) || isIntegral!(TypeUQ)) {
return new GQLDInt();
} else static if(isSomeString!Type) {
return new GQLDString();
Expand Down

0 comments on commit 5dd537e

Please sign in to comment.