metaforecast/schema.graphql

71 lines
1.3 KiB
GraphQL
Raw Normal View History

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!
}
2022-04-13 22:07:57 +00:00
type Query {
dashboard(id: ID!): Dashboard!
2022-04-13 22:07:57 +00:00
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!
2022-04-13 22:07:57 +00:00
}
type Question {
description: String!
id: ID!
options: [ProbabilityOption!]!
platform: Platform!
qualityIndicators: QualityIndicators!
timestamp: Date!
2022-04-13 22:07:57 +00:00
title: String!
url: String!
visualization: String
2022-04-13 22:07:57 +00:00
}
input SearchInput {
forecastingPlatforms: [String!]
forecastsThreshold: Int
limit: Int
query: String!
starsThreshold: Int
}