metaforecast/schema.graphql

86 lines
1.5 KiB
GraphQL
Raw Normal View History

2022-04-19 21:29:12 +00:00
input CreateDashboardInput {
creator: String
description: String
ids: [ID!]!
title: String!
}
type CreateDashboardResult {
dashboard: Dashboard!
}
type Dashboard {
creator: String!
description: String!
id: ID!
questions: [Question!]!
title: String!
}
"""Date serialized as the Unix timestamp."""
scalar Date
2022-04-19 21:29:12 +00:00
type Mutation {
createDashboard(input: CreateDashboardInput!): CreateDashboardResult!
}
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
}