metaforecast/schema.graphql
2022-04-19 01:15:42 +03:00

71 lines
1.3 KiB
GraphQL

type Dashboard {
creator: String!
description: String!
id: ID!
questions: [Question!]!
title: String!
}
"""Date serialized as the Unix timestamp."""
scalar Date
type PageInfo {
endCursor: String
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String
}
"""Platform supported by metaforecast"""
type Platform {
id: ID!
label: String!
}
type ProbabilityOption {
name: String
probability: Float
}
"""Various indicators of the question's quality"""
type QualityIndicators {
numForecasts: Int
stars: Int!
}
type Query {
dashboard(id: ID!): Dashboard!
frontpage: [Question!]!
questions(after: String, before: String, first: Int, last: Int): QueryQuestionsConnection!
searchQuestions(input: SearchInput!): [Question!]!
}
type QueryQuestionsConnection {
edges: [QueryQuestionsConnectionEdge]!
pageInfo: PageInfo!
}
type QueryQuestionsConnectionEdge {
cursor: String!
node: Question!
}
type Question {
description: String!
id: ID!
options: [ProbabilityOption!]!
platform: Platform!
qualityIndicators: QualityIndicators!
timestamp: Date!
title: String!
url: String!
visualization: String
}
input SearchInput {
forecastingPlatforms: [String!]
forecastsThreshold: Int
limit: Int
query: String!
starsThreshold: Int
}