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 Response | |
| { | |
| public object Data { get; set; } | |
| public string StatusCode { get; set; } | |
| public string ErrorMessage { get; set; } | |
| public Response(object data) | |
| { | |
| StatusCode = "Success"; | |
| Data = data; |
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 ResponseGraphType<TGraphType> : ObjectGraphType<Response> where TGraphType : GraphType | |
| { | |
| public ResponseGraphType() | |
| { | |
| Name = $"Response{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<TGraphType>( |
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
| { | |
| "data": { | |
| "project": { | |
| "statusCode": "NotFound", | |
| "errorMessage": "Resource not found", | |
| "data": null | |
| }, | |
| "projects": { | |
| "statusCode": "Success", | |
| "errorMessage": null, |
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
| { | |
| "data": { | |
| "project": { | |
| "statusCode": "Success", | |
| "errorMessage": null, | |
| "data": { | |
| "id": "projectA", | |
| "name": "Project A", | |
| "visibleBranches": [ | |
| "Latest" |
NewerOlder