Skip to content

Commit

Permalink
Add serialization representations to GQLDCustomLeaf so the vibe seria…
Browse files Browse the repository at this point in the history
…lizer can handle GQLDCustomLeaf objects
  • Loading branch information
jmt-lab authored and burner committed Nov 12, 2020
1 parent edfcb5d commit cbf67c6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/graphql/uda.d
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ struct GQLDCustomLeaf(T, alias SerializationFun, alias DeserializationFun) {
void opAssign(Type value) {
this.value = value;
}

static GQLDCustomLeaf!(T, SerializationFun, DeserializationFun) fromRepresentation(T input) @safe {
return GQLDCustomLeaf!(T, SerializationFun, DeserializationFun)(input);
}

T toRepresentation() @safe {
return this.value;
}

}

private string tS(DateTime dt) {
Expand Down

0 comments on commit cbf67c6

Please sign in to comment.