Files
revng-revng/python/revng/daemon/schema.graphql
T
Giacomo Vercesi 56af9c1f9d Propagate errors from Analysis/Pipes to daemon
Leverage the `rp_error` mechanism to propagate errors from analyses and
pipes to the GraphQL schema.
2023-11-03 12:13:58 +01:00

63 lines
1.6 KiB
GraphQL

# This file is distributed under the MIT License. See LICENSE.md for details.
# Failable operations are denoted by returning a union of a result type and
# *Error types. This allows the schema to explicitly mark which operations are
# failable and allows users to properly inspect the error's fields.
type Query {
produce(step: String!, container: String!, targetList: String!, onlyIfReady: Boolean): ProduceResult!
produceArtifacts(step: String!, paths: String, onlyIfReady: Boolean): ProduceResult!
target(step: String!, container: String!, target: String!): Target
targets(step: String!, container: String!): [Target!]!
getGlobal(name: String!): String!
pipelineDescription: String!
}
union ProduceResult = Produced | SimpleError | DocumentError
type Produced {
result: String!
}
type Target {
serialized: String
pathComponents: [String!]!
kind: String
ready: Boolean
}
type Mutation {
uploadB64(input: String!, container: String!): Boolean!
uploadFile(file: Upload, container: String!): Boolean!
runAnalysis(step: String!, analysis: String!, containerToTargets: String, options: String): AnalysisResult!
runAnalysesList(name: String!, options: String): AnalysisResult!
}
union AnalysisResult = Diff | SimpleError | DocumentError
type Diff {
diff: String!
}
type SimpleError {
errorType: String!
message: String!
}
type DocumentError {
errorType: String!
locationType: String!
reasons: [DocumentErrorReason!]!
}
type DocumentErrorReason {
message: String!
location: String!
}
type Subscription {
invalidations: String!
}
scalar Upload