Created
October 10, 2017 13:25
-
-
Save mczachurski/b0e167c1070f70e794cfc03a3c8839f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ResponseListGraphType<TGraphType> : ObjectGraphType<Response> where TGraphType : GraphType | |
{ | |
public ResponseListGraphType() | |
{ | |
Name = $"ResponseList{typeof(TGraphType).Name}"; | |
Field(x => x.StatusCode, nullable: true).Description("Status code of the request."); | |
Field(x => x.ErrorMessage, nullable: true).Description("Error message if requests fails."); | |
Field<ListGraphType<TGraphType>>( | |
"data", | |
"Project data returned by query.", | |
resolve: context => context.Source.Data | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment