Files
revng-revng/python/revng/internal/daemon/schema.graphql
Giacomo Vercesi f6f512883a revng daemon: add save mutation
Add the `save` mutation to the GraphQL api. This allows a client to
trigger saving.
2024-12-20 12:24:34 +01:00

75 lines
1.9 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, index: BigInt!): ProduceResult!
produceArtifacts(step: String!, paths: String, onlyIfReady: Boolean, index: BigInt!): ProduceResult!
target(step: String!, container: String!, target: String!): Target
targets(step: String!, container: String!): [Target!]!
getGlobal(name: String!): String!
pipelineDescription: String!
contextCommitIndex: BigInt!
}
union ProduceResult = Produced | SimpleError | DocumentError | IndexError
type Produced {
result: String!
}
type Target {
serialized: String
pathComponents: [String!]!
kind: String
ready: Boolean
}
type Mutation {
save: Boolean!
uploadB64(input: String!, container: String!): Boolean!
uploadFile(file: Upload, container: String!): Boolean!
runAnalysis(step: String!, analysis: String!, containerToTargets: String, options: String, index: BigInt!): AnalysisResult!
runAnalysesList(name: String!, options: String, index: BigInt!): AnalysisResult!
}
union AnalysisResult = Diff | SimpleError | DocumentError | IndexError
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 IndexError {
expectedIndex: BigInt!
}
type Subscription {
invalidations: Invalidation!
}
type Invalidation {
commitIndex: BigInt!
invalidations: String!
}
scalar Upload
scalar BigInt