Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL version of the TSP #44

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions graphql/tsp-mutation.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
interface UserError {
# A description of the error
message: String!
# A path to the input value that caused the error
path: [String!]
}

type TraceNotFound implements UserError {
message: String!
path: [String!]
}

type TraceTypeNotSupported implements UserError {
message: String!
path: [String!]
}

type TraceConflict implements UserError {
message: String!
path: [String!]
}

type ExperimentUpdateError implements UserError {
message: String!
path: [String!]
}

union ImportTraceError = TraceNotFound | TraceTypeNotSupported | TraceConflict

type ImportTracePayload {
trace: Trace
userErrors: [ImportTraceError!]
}

type DeleteTracePayload {
trace: Trace
success: Boolean
}

type CreationExperimentPayload {
experiment: Experiment
userErrors: [ExperimentUpdateError!]
}

type DeleteExperimentPayload {
experiment: Experiment
success: Boolean
}

type Mutation {
importTrace(uri: String!, name: String, typeId: String) : ImportTracePayload
deleteTrace(traceId: ID!, deleteTrace: Boolean, removeCache: Boolean): DeleteTracePayload

createOrUpdateExperiment(traceIds: [ID!]!, name: String!, experimentId: ID): CreationExperimentPayload
deleteExperiment(experimentId: ID!): DeleteExperimentPayload
}
212 changes: 212 additions & 0 deletions graphql/tsp-query.graphqls
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
type Trace {
name: String!
uuid: ID!
path: String!
nbEvents: String
startTime: String!
endTime: String
indexingStatus: IndexingStatus!
}

enum IndexingStatus {
RUNNING
COMPLETED
ERROR
}

type Experiment {
name: String!
uuid: ID!
nbEvents: String
startTime: String!
endTime: String
indexingStatus: IndexingStatus!
traces: [Trace!]!
}

type Bookmark {
uuid: ID!
start: String!
end: String
name: String!
type: String
iconUrl: String
}

type OutputDescriptor {
id: ID!
name: String
description: String
type: OutputType!
queryParameter: [OutputQueryParameter!]
start: String
end: String
final: Boolean
compatibleProviders: [ID!]
}

enum OutputType {
TABLE
TREE_TIME_XY
TREE_GRAPH
}

enum OutputStatus {
RUNNING
COMPLETED
FAILED
CANCELLED
}

type OutputQueryParameter {
key: String!
value: String!
}

type Table {
startIndex: String!
size: Int!
columns: [Column!]!
lines: [Line!]! @defer
}

type Column {
id: ID!
name: String!
columnDescription: String
columnType: String
}

type Line {
index: String!
cells: [Cell!]!
tags: [String!]
}

type Cell {
content: String!
tags: [String!]
}

type XY {
title: String
commonXAxis: Boolean
series: [XYSeries!]!
}

type XYSeries {
name: String
id: ID!
xAxis: XYAxis!
yAxis: XYAxis!
xValues: [String!]!
yValues: [String!]!
tags: [String!]
}

type XYAxis {
label: String!
unit: String
}

type TreeXY implements treeOutput{
output: OutputDescriptor
status: OutputStatus!
statusMessage: String
tree: Tree!
xy: XY! @defer
style: Style @defer
}

type TimeGraph implements treeOutput{
output: OutputDescriptor
status: OutputStatus!
statusMessage: String
tree: Tree!
rows: [TimeGraphRow!] @defer
style: Style @defer
}

type TimeGraphRow {
id: ID!
states: [TimeGraphState!]
}

type TimeGraphState {
start: String!
end: String!
label: String
tags: [String!]
styleKey: String
}

type StyleValue {
bgColor: String
fgColor: String
height: Int
font: String
fontColor: String
additional: [AdditionalStyleValue!]
}

type AdditionalStyleValue {
key: String!
value: String!
}

type Style {
key: String!
value: StyleValue!
}

type Entry {
name: [String!]!
id: ID!
parentId: ID
}

type EntryHeader {
name: String!
}

type Tree {
entries: [Entry!]
headers: [EntryHeader!]
}

type Tooltip {
key: String!
value: String!
}

interface treeOutput {
output: OutputDescriptor
status: OutputStatus!
statusMessage: String
tree: Tree!
}

input QueryInput {
parameters: [ParameterInput!]
filter: [Int!]
}

input ParameterInput {
key: String!
value: String!
}

type Query {
traces(): [Trace!]
experiments(): [Experiment!]
experiment(experimentId: ID!): Experiment!
experimentOutputs(experimentId: ID!): OutputDescriptor!

treeXY(experimentId: ID!, outputId: ID!, treeParameter: QueryInput, XYParameter: QueryInput): TreeXY!
XYTooltip(experimentId: ID!, outputId: ID!, xValue: String!, yValue: String, seriesId: ID): [Tooltip!]

timegraph(experimentId: ID!, outputId: ID!, treeParameter: QueryInput, timegraphParameter: QueryInput): TimeGraph!
timegraphTooltip(experimentId: ID!, outputId: ID!, time: String!, entryId: ID, targetId: ID): [Tooltip!]

virtualTable(experimentId: ID!, outputId: ID!, tableParameter: QueryInput): Table!
}