Files
hetty/pkg/api/schema.graphql

109 lines
1.6 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 {
requestId: ID!
proto: String!
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 {
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!
}
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
}
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!]!
2020-10-11 17:09:39 +02:00
}
type Mutation {
openProject(name: String!): Project
closeProject: CloseProjectResult!
deleteProject(name: String!): DeleteProjectResult!
clearHTTPRequestLog: ClearHTTPRequestLogResult!
2020-10-29 20:54:17 +01:00
setScope(scope: [ScopeRuleInput!]!): [ScopeRule!]!
setHttpRequestLogFilter(
filter: HttpRequestLogFilterInput
): HttpRequestLogFilter
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
}
scalar Time
2020-10-29 20:54:17 +01:00
scalar Regexp