2022-04-19 21:29:12 +00:00
|
|
|
input CreateDashboardInput {
|
2022-04-25 20:23:31 +00:00
|
|
|
"""
|
|
|
|
The creator of the dashboard, e.g. "Peter Parker"
|
|
|
|
"""
|
2022-04-19 21:29:12 +00:00
|
|
|
creator: String
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""The longer description of the dashboard"""
|
2022-04-19 21:29:12 +00:00
|
|
|
description: String
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""List of question ids"""
|
2022-04-19 21:29:12 +00:00
|
|
|
ids: [ID!]!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""The title of the dashboard"""
|
2022-04-19 21:29:12 +00:00
|
|
|
title: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type CreateDashboardResult {
|
|
|
|
dashboard: Dashboard!
|
|
|
|
}
|
|
|
|
|
2022-04-18 22:12:15 +00:00
|
|
|
type Dashboard {
|
2022-04-25 20:23:31 +00:00
|
|
|
"""
|
|
|
|
The creator of the dashboard, e.g. "Peter Parker"
|
|
|
|
"""
|
2022-04-18 22:12:15 +00:00
|
|
|
creator: String!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""The longer description of the dashboard"""
|
2022-04-18 22:12:15 +00:00
|
|
|
description: String!
|
|
|
|
id: ID!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""The list of questions on the dashboard"""
|
2022-04-18 22:12:15 +00:00
|
|
|
questions: [Question!]!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""The title of the dashboard"""
|
2022-04-18 22:12:15 +00:00
|
|
|
title: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
"""Date serialized as the Unix timestamp."""
|
|
|
|
scalar Date
|
|
|
|
|
2022-04-27 19:02:14 +00:00
|
|
|
type History implements QuestionShape {
|
|
|
|
description: String!
|
|
|
|
|
|
|
|
"""History items are identified by their integer ids"""
|
|
|
|
id: ID!
|
|
|
|
options: [ProbabilityOption!]!
|
|
|
|
platform: Platform!
|
|
|
|
qualityIndicators: QualityIndicators!
|
|
|
|
|
|
|
|
"""Unique string which identifies the question"""
|
|
|
|
questionId: ID!
|
|
|
|
|
|
|
|
"""Timestamp at which metaforecast fetched the question"""
|
|
|
|
timestamp: Date!
|
|
|
|
title: String!
|
|
|
|
|
|
|
|
"""
|
|
|
|
Non-unique, a very small number of platforms have a page for more than one prediction
|
|
|
|
"""
|
|
|
|
url: String!
|
|
|
|
}
|
|
|
|
|
2022-04-19 21:29:12 +00:00
|
|
|
type Mutation {
|
2022-04-25 20:23:31 +00:00
|
|
|
"""
|
|
|
|
Create a new dashboard; if the dashboard with given ids already exists then it will be returned instead.
|
|
|
|
"""
|
2022-04-19 21:29:12 +00:00
|
|
|
createDashboard(input: CreateDashboardInput!): CreateDashboardResult!
|
|
|
|
}
|
|
|
|
|
2022-04-18 22:12:15 +00:00
|
|
|
type PageInfo {
|
|
|
|
endCursor: String
|
|
|
|
hasNextPage: Boolean!
|
|
|
|
hasPreviousPage: Boolean!
|
|
|
|
startCursor: String
|
|
|
|
}
|
|
|
|
|
2022-04-25 20:23:31 +00:00
|
|
|
"""Forecasting platform supported by Metaforecast"""
|
2022-04-18 22:12:15 +00:00
|
|
|
type Platform {
|
2022-04-25 20:23:31 +00:00
|
|
|
"""
|
|
|
|
Short unique platform name, e.g. "xrisk"
|
|
|
|
"""
|
2022-04-18 22:12:15 +00:00
|
|
|
id: ID!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
Platform name for displaying on frontend etc., e.g. "X-risk estimates"
|
|
|
|
"""
|
2022-04-18 22:12:15 +00:00
|
|
|
label: String!
|
2022-04-27 19:02:14 +00:00
|
|
|
lastUpdated: Date
|
2022-04-18 22:12:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ProbabilityOption {
|
|
|
|
name: String
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""0 to 1"""
|
2022-04-18 22:12:15 +00:00
|
|
|
probability: Float
|
|
|
|
}
|
|
|
|
|
|
|
|
"""Various indicators of the question's quality"""
|
|
|
|
type QualityIndicators {
|
2022-04-25 20:24:56 +00:00
|
|
|
liquidity: Float
|
|
|
|
numForecasters: Int
|
2022-04-18 22:12:15 +00:00
|
|
|
numForecasts: Int
|
2022-04-25 20:24:56 +00:00
|
|
|
openInterest: Float
|
|
|
|
sharesVolume: Float
|
|
|
|
spread: Float
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""0 to 5"""
|
2022-04-18 22:12:15 +00:00
|
|
|
stars: Int!
|
2022-04-25 20:24:56 +00:00
|
|
|
tradeVolume: Float
|
|
|
|
volume: Float
|
2022-04-18 22:12:15 +00:00
|
|
|
}
|
|
|
|
|
2022-04-13 22:07:57 +00:00
|
|
|
type Query {
|
2022-04-25 20:23:31 +00:00
|
|
|
"""Look up a single dashboard by its id"""
|
2022-04-18 22:12:15 +00:00
|
|
|
dashboard(id: ID!): Dashboard!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""Get a list of questions that are currently on the frontpage"""
|
2022-04-13 22:07:57 +00:00
|
|
|
frontpage: [Question!]!
|
2022-04-27 19:02:14 +00:00
|
|
|
platforms: [Platform!]!
|
2022-04-25 19:56:18 +00:00
|
|
|
|
|
|
|
"""Look up a single question by its id"""
|
|
|
|
question(id: ID!): Question!
|
2022-04-18 22:12:15 +00:00
|
|
|
questions(after: String, before: String, first: Int, last: Int): QueryQuestionsConnection!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
Search for questions; uses Algolia instead of the primary metaforecast database
|
|
|
|
"""
|
2022-04-18 22:12:15 +00:00
|
|
|
searchQuestions(input: SearchInput!): [Question!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
type QueryQuestionsConnection {
|
|
|
|
edges: [QueryQuestionsConnectionEdge]!
|
|
|
|
pageInfo: PageInfo!
|
|
|
|
}
|
|
|
|
|
|
|
|
type QueryQuestionsConnectionEdge {
|
|
|
|
cursor: String!
|
|
|
|
node: Question!
|
2022-04-13 22:07:57 +00:00
|
|
|
}
|
|
|
|
|
2022-04-27 19:02:14 +00:00
|
|
|
type Question implements QuestionShape {
|
2022-04-18 22:12:15 +00:00
|
|
|
description: String!
|
2022-04-27 19:02:14 +00:00
|
|
|
history: [History!]!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""Unique string which identifies the question"""
|
2022-04-18 22:12:15 +00:00
|
|
|
id: ID!
|
|
|
|
options: [ProbabilityOption!]!
|
|
|
|
platform: Platform!
|
|
|
|
qualityIndicators: QualityIndicators!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""Timestamp at which metaforecast fetched the question"""
|
2022-04-18 22:12:15 +00:00
|
|
|
timestamp: Date!
|
2022-04-13 22:07:57 +00:00
|
|
|
title: String!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
Non-unique, a very small number of platforms have a page for more than one prediction
|
|
|
|
"""
|
2022-04-18 22:12:15 +00:00
|
|
|
url: String!
|
|
|
|
visualization: String
|
2022-04-13 22:07:57 +00:00
|
|
|
}
|
2022-04-18 22:12:15 +00:00
|
|
|
|
2022-04-27 19:02:14 +00:00
|
|
|
interface QuestionShape {
|
|
|
|
description: String!
|
|
|
|
options: [ProbabilityOption!]!
|
|
|
|
platform: Platform!
|
|
|
|
qualityIndicators: QualityIndicators!
|
|
|
|
|
|
|
|
"""Timestamp at which metaforecast fetched the question"""
|
|
|
|
timestamp: Date!
|
|
|
|
title: String!
|
|
|
|
|
|
|
|
"""
|
|
|
|
Non-unique, a very small number of platforms have a page for more than one prediction
|
|
|
|
"""
|
|
|
|
url: String!
|
|
|
|
}
|
|
|
|
|
2022-04-18 22:12:15 +00:00
|
|
|
input SearchInput {
|
2022-04-25 20:23:31 +00:00
|
|
|
"""List of platform ids to filter by"""
|
2022-04-18 22:12:15 +00:00
|
|
|
forecastingPlatforms: [String!]
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""Minimum number of forecasts on a question"""
|
2022-04-18 22:12:15 +00:00
|
|
|
forecastsThreshold: Int
|
|
|
|
limit: Int
|
|
|
|
query: String!
|
2022-04-25 20:23:31 +00:00
|
|
|
|
|
|
|
"""Minimum number of stars on a question"""
|
2022-04-18 22:12:15 +00:00
|
|
|
starsThreshold: Int
|
|
|
|
}
|