Files
revng-revng/python/revng/daemon/schema.graphql
Giacomo Vercesi 046612f11c revng.graphql: enforce index consistency
Force clients to provide the current index to run `produce` or
`runAnalysis`. Requests that do not provide the correct index return an
IndexError object.
2023-11-03 14:51:31 +01:00

74 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 {
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