Merge pull request #70 from quantified-uncertainty/indicators-fix

Indicators fix
This commit is contained in:
Vyacheslav Matyukhin 2022-04-25 23:46:21 +03:00 committed by GitHub
commit 72600947d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 173 additions and 47 deletions

View File

@ -1,7 +1,16 @@
input CreateDashboardInput {
"""
The creator of the dashboard, e.g. "Peter Parker"
"""
creator: String
"""The longer description of the dashboard"""
description: String
"""List of question ids"""
ids: [ID!]!
"""The title of the dashboard"""
title: String!
}
@ -10,10 +19,19 @@ type CreateDashboardResult {
}
type Dashboard {
"""
The creator of the dashboard, e.g. "Peter Parker"
"""
creator: String!
"""The longer description of the dashboard"""
description: String!
id: ID!
"""The list of questions on the dashboard"""
questions: [Question!]!
"""The title of the dashboard"""
title: String!
}
@ -21,6 +39,9 @@ type Dashboard {
scalar Date
type Mutation {
"""
Create a new dashboard; if the dashboard with given ids already exists then it will be returned instead.
"""
createDashboard(input: CreateDashboardInput!): CreateDashboardResult!
}
@ -31,27 +52,52 @@ type PageInfo {
startCursor: String
}
"""Platform supported by metaforecast"""
"""Forecasting platform supported by Metaforecast"""
type Platform {
"""
Short unique platform name, e.g. "xrisk"
"""
id: ID!
"""
Platform name for displaying on frontend etc., e.g. "X-risk estimates"
"""
label: String!
}
type ProbabilityOption {
name: String
"""0 to 1"""
probability: Float
}
"""Various indicators of the question's quality"""
type QualityIndicators {
liquidity: Float
numForecasters: Int
numForecasts: Int
openInterest: Float
sharesVolume: Float
spread: Float
"""0 to 5"""
stars: Int!
tradeVolume: Float
volume: Float
}
type Query {
"""Look up a single dashboard by its id"""
dashboard(id: ID!): Dashboard!
"""Get a list of questions that are currently on the frontpage"""
frontpage: [Question!]!
questions(after: String, before: String, first: Int, last: Int): QueryQuestionsConnection!
"""
Search for questions; uses Algolia instead of the primary metaforecast database
"""
searchQuestions(input: SearchInput!): [Question!]!
}
@ -67,20 +113,33 @@ type QueryQuestionsConnectionEdge {
type Question {
description: String!
"""Unique string which identifies the question"""
id: ID!
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!
visualization: String
}
input SearchInput {
"""List of platform ids to filter by"""
forecastingPlatforms: [String!]
"""Minimum number of forecasts on a question"""
forecastsThreshold: Int
limit: Int
query: String!
"""Minimum number of stars on a question"""
starsThreshold: Int
}

View File

@ -34,6 +34,8 @@ export interface QualityIndicators {
yes_bid?: any;
yes_ask?: any;
spread?: any;
open_interest?: any;
trade_volume?: any;
}
export type FetchedQuestion = Omit<

File diff suppressed because one or more lines are too long

View File

@ -34,18 +34,36 @@ export const QualityIndicatorsObj = builder
.objectRef<QualityIndicators>("QualityIndicators")
.implement({
description: "Various indicators of the question's quality",
fields: (t) => ({
fields: (t) => {
const maybeIntField = (name: keyof QualityIndicators) =>
t.int({
nullable: true,
resolve: (parent) =>
parent[name] === undefined ? undefined : Number(parent[name]),
});
const maybeFloatField = (name: keyof QualityIndicators) =>
t.float({
nullable: true,
resolve: (parent) =>
parent[name] === undefined ? undefined : Number(parent[name]),
});
return {
stars: t.exposeInt("stars", {
description: "0 to 5",
}),
numForecasts: t.int({
nullable: true,
resolve: (parent) =>
parent.numforecasts === undefined
? undefined
: Number(parent.numforecasts),
}),
}),
numForecasts: maybeIntField("numforecasts"),
numForecasters: maybeIntField("numforecasters"),
volume: maybeFloatField("volume"),
// yesBid: maybeNumberField("yes_bid"),
// yesAsk: maybeNumberField("yes_ask"),
spread: maybeFloatField("spread"),
sharesVolume: maybeFloatField("shares_volume"),
openInterest: maybeFloatField("open_interest"),
liquidity: maybeFloatField("liquidity"),
tradeVolume: maybeFloatField("trade_volume"),
};
},
});
export const ProbabilityOptionObj = builder

View File

@ -15,9 +15,13 @@ export type Scalars = {
};
export type CreateDashboardInput = {
/** The creator of the dashboard, e.g. "Peter Parker" */
creator?: InputMaybe<Scalars['String']>;
/** The longer description of the dashboard */
description?: InputMaybe<Scalars['String']>;
/** List of question ids */
ids: Array<Scalars['ID']>;
/** The title of the dashboard */
title: Scalars['String'];
};
@ -28,15 +32,20 @@ export type CreateDashboardResult = {
export type Dashboard = {
__typename?: 'Dashboard';
/** The creator of the dashboard, e.g. "Peter Parker" */
creator: Scalars['String'];
/** The longer description of the dashboard */
description: Scalars['String'];
id: Scalars['ID'];
/** The list of questions on the dashboard */
questions: Array<Question>;
/** The title of the dashboard */
title: Scalars['String'];
};
export type Mutation = {
__typename?: 'Mutation';
/** Create a new dashboard; if the dashboard with given ids already exists then it will be returned instead. */
createDashboard: CreateDashboardResult;
};
@ -53,31 +62,45 @@ export type PageInfo = {
startCursor?: Maybe<Scalars['String']>;
};
/** Platform supported by metaforecast */
/** Forecasting platform supported by Metaforecast */
export type Platform = {
__typename?: 'Platform';
/** Short unique platform name, e.g. "xrisk" */
id: Scalars['ID'];
/** Platform name for displaying on frontend etc., e.g. "X-risk estimates" */
label: Scalars['String'];
};
export type ProbabilityOption = {
__typename?: 'ProbabilityOption';
name?: Maybe<Scalars['String']>;
/** 0 to 1 */
probability?: Maybe<Scalars['Float']>;
};
/** Various indicators of the question's quality */
export type QualityIndicators = {
__typename?: 'QualityIndicators';
liquidity?: Maybe<Scalars['Float']>;
numForecasters?: Maybe<Scalars['Int']>;
numForecasts?: Maybe<Scalars['Int']>;
openInterest?: Maybe<Scalars['Float']>;
sharesVolume?: Maybe<Scalars['Float']>;
spread?: Maybe<Scalars['Float']>;
/** 0 to 5 */
stars: Scalars['Int'];
tradeVolume?: Maybe<Scalars['Float']>;
volume?: Maybe<Scalars['Float']>;
};
export type Query = {
__typename?: 'Query';
/** Look up a single dashboard by its id */
dashboard: Dashboard;
/** Get a list of questions that are currently on the frontpage */
frontpage: Array<Question>;
questions: QueryQuestionsConnection;
/** Search for questions; uses Algolia instead of the primary metaforecast database */
searchQuestions: Array<Question>;
};
@ -114,20 +137,26 @@ export type QueryQuestionsConnectionEdge = {
export type Question = {
__typename?: 'Question';
description: Scalars['String'];
/** Unique string which identifies the question */
id: Scalars['ID'];
options: Array<ProbabilityOption>;
platform: Platform;
qualityIndicators: QualityIndicators;
/** Timestamp at which metaforecast fetched the question */
timestamp: Scalars['Date'];
title: Scalars['String'];
/** Non-unique, a very small number of platforms have a page for more than one prediction */
url: Scalars['String'];
visualization?: Maybe<Scalars['String']>;
};
export type SearchInput = {
/** List of platform ids to filter by */
forecastingPlatforms?: InputMaybe<Array<Scalars['String']>>;
/** Minimum number of forecasts on a question */
forecastsThreshold?: InputMaybe<Scalars['Int']>;
limit?: InputMaybe<Scalars['Int']>;
query: Scalars['String'];
/** Minimum number of stars on a question */
starsThreshold?: InputMaybe<Scalars['Int']>;
};

View File

@ -2,21 +2,21 @@ import * as Types from '../../graphql/types.generated';
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
import { QuestionFragmentDoc } from '../search/queries.generated';
export type DashboardFragment = { __typename?: 'Dashboard', id: string, title: string, description: string, creator: string, questions: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null } }> };
export type DashboardFragment = { __typename?: 'Dashboard', id: string, title: string, description: string, creator: string, questions: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null, numForecasters?: number | null, volume?: number | null, spread?: number | null, sharesVolume?: number | null, openInterest?: number | null, liquidity?: number | null, tradeVolume?: number | null } }> };
export type DashboardByIdQueryVariables = Types.Exact<{
id: Types.Scalars['ID'];
}>;
export type DashboardByIdQuery = { __typename?: 'Query', result: { __typename?: 'Dashboard', id: string, title: string, description: string, creator: string, questions: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null } }> } };
export type DashboardByIdQuery = { __typename?: 'Query', result: { __typename?: 'Dashboard', id: string, title: string, description: string, creator: string, questions: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null, numForecasters?: number | null, volume?: number | null, spread?: number | null, sharesVolume?: number | null, openInterest?: number | null, liquidity?: number | null, tradeVolume?: number | null } }> } };
export type CreateDashboardMutationVariables = Types.Exact<{
input: Types.CreateDashboardInput;
}>;
export type CreateDashboardMutation = { __typename?: 'Mutation', result: { __typename?: 'CreateDashboardResult', dashboard: { __typename?: 'Dashboard', id: string, title: string, description: string, creator: string, questions: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null } }> } } };
export type CreateDashboardMutation = { __typename?: 'Mutation', result: { __typename?: 'CreateDashboardResult', dashboard: { __typename?: 'Dashboard', id: string, title: string, description: string, creator: string, questions: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null, numForecasters?: number | null, volume?: number | null, spread?: number | null, sharesVolume?: number | null, openInterest?: number | null, liquidity?: number | null, tradeVolume?: number | null } }> } } };
export const DashboardFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Dashboard"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Dashboard"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},...QuestionFragmentDoc.definitions]} as unknown as DocumentNode<DashboardFragment, unknown>;
export const DashboardByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"DashboardById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"result"},"name":{"kind":"Name","value":"dashboard"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Dashboard"}}]}}]}},...DashboardFragmentDoc.definitions]} as unknown as DocumentNode<DashboardByIdQuery, DashboardByIdQueryVariables>;

View File

@ -1,7 +1,12 @@
const formatQualityIndicator = (indicator) => {
let result;
import { QuestionFragment } from "../../search/queries.generated";
type QualityIndicator = QuestionFragment["qualityIndicators"];
type IndicatorName = keyof QualityIndicator;
const formatQualityIndicator = (indicator: IndicatorName) => {
let result: string | null = null;
switch (indicator) {
case "numforecasts":
case "numForecasts":
result = null;
break;
@ -13,38 +18,38 @@ const formatQualityIndicator = (indicator) => {
result = "Volume";
break;
case "numforecasters":
case "numForecasters":
result = "Forecasters";
break;
case "yes_bid":
result = null; // "Yes bid"
break;
// case "yesBid":
// result = null; // "Yes bid"
// break;
case "yes_ask":
result = null; // "Yes ask"
break;
// case "yesAsk":
// result = null; // "Yes ask"
// break;
case "spread":
result = "Spread";
break;
case "shares_volume":
case "sharesVolume":
result = "Shares vol.";
break;
case "open_interest":
case "openInterest":
result = "Interest";
break;
case "resolution_data":
result = null;
break;
// case "resolution_data":
// result = null;
// break;
case "liquidity":
result = "Liquidity";
break;
case "tradevolume":
case "tradeVolume":
result = "Volume";
break;
}
@ -61,11 +66,11 @@ const formatNumber = (num) => {
}
};
const formatQualityIndicators = (qualityIndicators: any) => {
let newQualityIndicators = {};
for (let key in qualityIndicators) {
let newKey = formatQualityIndicator(key);
if (newKey) {
const formatQualityIndicators = (qualityIndicators: QualityIndicator) => {
let newQualityIndicators: { [k: string]: string | number } = {};
for (const key of Object.keys(qualityIndicators)) {
const newKey = formatQualityIndicator(key as IndicatorName);
if (newKey && qualityIndicators[key] !== null) {
newQualityIndicators[newKey] = qualityIndicators[key];
}
}
@ -74,7 +79,13 @@ const formatQualityIndicators = (qualityIndicators: any) => {
/* Display functions*/
const getPercentageSymbolIfNeeded = ({ indicator, platform }) => {
const getPercentageSymbolIfNeeded = ({
indicator,
platform,
}: {
indicator: string;
platform: string;
}) => {
let indicatorsWhichNeedPercentageSymbol = ["Spread"];
if (indicatorsWhichNeedPercentageSymbol.includes(indicator)) {
return "%";
@ -87,7 +98,7 @@ const getCurrencySymbolIfNeeded = ({
indicator,
platform,
}: {
indicator: any;
indicator: string;
platform: string;
}) => {
let indicatorsWhichNeedCurrencySymbol = ["Volume", "Interest", "Liquidity"];
@ -137,7 +148,7 @@ const displayQualityIndicators: React.FC<{
numforecasts: number;
lastUpdated: Date;
showTimeStamp: boolean;
qualityindicators: any;
qualityindicators: QuestionFragment["qualityIndicators"];
platform: string; // id string - e.g. "goodjudgment", not "Good Judgment"
}> = ({
numforecasts,
@ -237,7 +248,7 @@ interface Props {
platform: string;
platformLabel: string;
numforecasts: any;
qualityindicators: any;
qualityindicators: QuestionFragment["qualityIndicators"];
lastUpdated: Date;
showTimeStamp: boolean;
expandFooterToFullWidth: boolean;

View File

@ -1,20 +1,20 @@
import * as Types from '../../graphql/types.generated';
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
export type QuestionFragment = { __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null } };
export type QuestionFragment = { __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null, numForecasters?: number | null, volume?: number | null, spread?: number | null, sharesVolume?: number | null, openInterest?: number | null, liquidity?: number | null, tradeVolume?: number | null } };
export type FrontpageQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type FrontpageQuery = { __typename?: 'Query', result: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null } }> };
export type FrontpageQuery = { __typename?: 'Query', result: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null, numForecasters?: number | null, volume?: number | null, spread?: number | null, sharesVolume?: number | null, openInterest?: number | null, liquidity?: number | null, tradeVolume?: number | null } }> };
export type SearchQueryVariables = Types.Exact<{
input: Types.SearchInput;
}>;
export type SearchQuery = { __typename?: 'Query', result: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null } }> };
export type SearchQuery = { __typename?: 'Query', result: Array<{ __typename?: 'Question', id: string, url: string, title: string, description: string, timestamp: number, visualization?: string | null, options: Array<{ __typename?: 'ProbabilityOption', name?: string | null, probability?: number | null }>, platform: { __typename?: 'Platform', id: string, label: string }, qualityIndicators: { __typename?: 'QualityIndicators', stars: number, numForecasts?: number | null, numForecasters?: number | null, volume?: number | null, spread?: number | null, sharesVolume?: number | null, openInterest?: number | null, liquidity?: number | null, tradeVolume?: number | null } }> };
export const QuestionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Question"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"probability"}}]}},{"kind":"Field","name":{"kind":"Name","value":"platform"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}},{"kind":"Field","name":{"kind":"Name","value":"qualityIndicators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stars"}},{"kind":"Field","name":{"kind":"Name","value":"numForecasts"}}]}},{"kind":"Field","name":{"kind":"Name","value":"visualization"}}]}}]} as unknown as DocumentNode<QuestionFragment, unknown>;
export const QuestionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Question"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"probability"}}]}},{"kind":"Field","name":{"kind":"Name","value":"platform"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"label"}}]}},{"kind":"Field","name":{"kind":"Name","value":"qualityIndicators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stars"}},{"kind":"Field","name":{"kind":"Name","value":"numForecasts"}},{"kind":"Field","name":{"kind":"Name","value":"numForecasters"}},{"kind":"Field","name":{"kind":"Name","value":"volume"}},{"kind":"Field","name":{"kind":"Name","value":"spread"}},{"kind":"Field","name":{"kind":"Name","value":"sharesVolume"}},{"kind":"Field","name":{"kind":"Name","value":"openInterest"}},{"kind":"Field","name":{"kind":"Name","value":"liquidity"}},{"kind":"Field","name":{"kind":"Name","value":"tradeVolume"}}]}},{"kind":"Field","name":{"kind":"Name","value":"visualization"}}]}}]} as unknown as DocumentNode<QuestionFragment, unknown>;
export const FrontpageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Frontpage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"result"},"name":{"kind":"Name","value":"frontpage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},...QuestionFragmentDoc.definitions]} as unknown as DocumentNode<FrontpageQuery, FrontpageQueryVariables>;
export const SearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Search"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SearchInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"result"},"name":{"kind":"Name","value":"searchQuestions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},...QuestionFragmentDoc.definitions]} as unknown as DocumentNode<SearchQuery, SearchQueryVariables>;

View File

@ -15,6 +15,13 @@ fragment Question on Question {
qualityIndicators {
stars
numForecasts
numForecasters
volume
spread
sharesVolume
openInterest
liquidity
tradeVolume
}
visualization
}