Files
hetty/pkg/api/schema.graphql

167 lines
2.8 KiB
GraphQL
Raw Normal View History

type HttpRequestLog {
id: ID!
url: String!
method: HttpMethod!
proto: String!
headers: [HttpHeader!]!
body: String
timestamp: Time!
response: HttpResponseLog
2019-12-01 14:47:25 +01:00
}
type HttpResponseLog {
2022-02-22 14:10:39 +01:00
"""
Will be the same ID as its related request ID.
"""
id: ID!
proto: HttpProtocol!
statusCode: Int!
statusReason: String!
body: String
headers: [HttpHeader!]!
}
type HttpHeader {
key: String!
value: String!
}
2019-12-01 14:47:25 +01:00
2020-10-11 17:09:39 +02:00
type Project {
2022-01-21 11:45:54 +01:00
id: ID!
2020-10-11 17:09:39 +02:00
name: String!
isActive: Boolean!
}
2020-10-29 20:54:17 +01:00
type ScopeRule {
url: Regexp
header: ScopeHeader
body: Regexp
}
input ScopeRuleInput {
url: Regexp
header: ScopeHeaderInput
body: Regexp
}
type ScopeHeader {
key: Regexp
value: Regexp
}
input ScopeHeaderInput {
key: Regexp
value: Regexp
}
2020-10-11 17:09:39 +02:00
type CloseProjectResult {
success: Boolean!
}
type DeleteProjectResult {
success: Boolean!
}
type ClearHTTPRequestLogResult {
success: Boolean!
}
2022-02-22 14:10:39 +01:00
type DeleteSenderRequestsResult {
success: Boolean!
}
2020-10-29 20:54:17 +01:00
input HttpRequestLogFilterInput {
onlyInScope: Boolean
searchExpression: String
2020-10-29 20:54:17 +01:00
}
type HttpRequestLogFilter {
onlyInScope: Boolean!
searchExpression: String
2020-10-29 20:54:17 +01:00
}
2022-02-22 14:10:39 +01:00
input SenderRequestInput {
id: ID
url: URL!
method: HttpMethod
proto: HttpProtocol
headers: [HttpHeaderInput!]
body: String
}
input HttpHeaderInput {
key: String!
value: String!
}
type SenderRequest {
id: ID!
sourceRequestLogID: ID
url: URL!
method: HttpMethod!
proto: HttpProtocol!
headers: [HttpHeader!]
body: String
timestamp: Time!
response: HttpResponseLog
}
input SenderRequestFilterInput {
onlyInScope: Boolean
searchExpression: String
}
type SenderRequestFilter {
onlyInScope: Boolean!
searchExpression: String
}
2019-12-01 14:47:25 +01:00
type Query {
httpRequestLog(id: ID!): HttpRequestLog
httpRequestLogs: [HttpRequestLog!]!
2020-10-29 20:54:17 +01:00
httpRequestLogFilter: HttpRequestLogFilter
2020-10-11 17:09:39 +02:00
activeProject: Project
projects: [Project!]!
2020-10-29 20:54:17 +01:00
scope: [ScopeRule!]!
2022-02-22 14:10:39 +01:00
senderRequest(id: ID!): SenderRequest
senderRequests: [SenderRequest!]!
2020-10-11 17:09:39 +02:00
}
type Mutation {
2022-01-21 11:45:54 +01:00
createProject(name: String!): Project
openProject(id: ID!): Project
2020-10-11 17:09:39 +02:00
closeProject: CloseProjectResult!
2022-01-21 11:45:54 +01:00
deleteProject(id: ID!): DeleteProjectResult!
clearHTTPRequestLog: ClearHTTPRequestLogResult!
2020-10-29 20:54:17 +01:00
setScope(scope: [ScopeRuleInput!]!): [ScopeRule!]!
setHttpRequestLogFilter(
filter: HttpRequestLogFilterInput
): HttpRequestLogFilter
2022-02-22 14:10:39 +01:00
setSenderRequestFilter(filter: SenderRequestFilterInput): SenderRequestFilter
createOrUpdateSenderRequest(request: SenderRequestInput!): SenderRequest!
createSenderRequestFromHttpRequestLog(id: ID!): SenderRequest!
sendRequest(id: ID!): SenderRequest!
deleteSenderRequests: DeleteSenderRequestsResult!
2019-12-01 14:47:25 +01:00
}
enum HttpMethod {
GET
HEAD
POST
PUT
DELETE
CONNECT
OPTIONS
TRACE
PATCH
2019-12-01 14:47:25 +01:00
}
2022-02-22 14:10:39 +01:00
enum HttpProtocol {
HTTP1
HTTP2
}
scalar Time
2020-10-29 20:54:17 +01:00
scalar Regexp
2022-02-22 14:10:39 +01:00
scalar URL