fix: expose qualityIndicators fields in graphql
This commit is contained in:
parent
7520c43307
commit
c039dde3e7
|
@ -74,10 +74,17 @@ type ProbabilityOption {
|
||||||
|
|
||||||
"""Various indicators of the question's quality"""
|
"""Various indicators of the question's quality"""
|
||||||
type QualityIndicators {
|
type QualityIndicators {
|
||||||
|
liquidity: Float
|
||||||
|
numForecasters: Int
|
||||||
numForecasts: Int
|
numForecasts: Int
|
||||||
|
openInterest: Float
|
||||||
|
sharesVolume: Float
|
||||||
|
spread: Float
|
||||||
|
|
||||||
"""0 to 5"""
|
"""0 to 5"""
|
||||||
stars: Int!
|
stars: Int!
|
||||||
|
tradeVolume: Float
|
||||||
|
volume: Float
|
||||||
}
|
}
|
||||||
|
|
||||||
type Query {
|
type Query {
|
||||||
|
|
|
@ -34,6 +34,8 @@ export interface QualityIndicators {
|
||||||
yes_bid?: any;
|
yes_bid?: any;
|
||||||
yes_ask?: any;
|
yes_ask?: any;
|
||||||
spread?: any;
|
spread?: any;
|
||||||
|
open_interest?: any;
|
||||||
|
trade_volume?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type FetchedQuestion = Omit<
|
export type FetchedQuestion = Omit<
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -34,18 +34,36 @@ export const QualityIndicatorsObj = builder
|
||||||
.objectRef<QualityIndicators>("QualityIndicators")
|
.objectRef<QualityIndicators>("QualityIndicators")
|
||||||
.implement({
|
.implement({
|
||||||
description: "Various indicators of the question's quality",
|
description: "Various indicators of the question's quality",
|
||||||
fields: (t) => ({
|
fields: (t) => {
|
||||||
stars: t.exposeInt("stars", {
|
const maybeIntField = (name: keyof QualityIndicators) =>
|
||||||
description: "0 to 5",
|
t.int({
|
||||||
}),
|
nullable: true,
|
||||||
numForecasts: t.int({
|
resolve: (parent) =>
|
||||||
nullable: true,
|
parent[name] === undefined ? undefined : Number(parent[name]),
|
||||||
resolve: (parent) =>
|
});
|
||||||
parent.numforecasts === undefined
|
const maybeFloatField = (name: keyof QualityIndicators) =>
|
||||||
? undefined
|
t.float({
|
||||||
: Number(parent.numforecasts),
|
nullable: true,
|
||||||
}),
|
resolve: (parent) =>
|
||||||
}),
|
parent[name] === undefined ? undefined : Number(parent[name]),
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
stars: t.exposeInt("stars", {
|
||||||
|
description: "0 to 5",
|
||||||
|
}),
|
||||||
|
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
|
export const ProbabilityOptionObj = builder
|
||||||
|
|
|
@ -81,9 +81,16 @@ export type ProbabilityOption = {
|
||||||
/** Various indicators of the question's quality */
|
/** Various indicators of the question's quality */
|
||||||
export type QualityIndicators = {
|
export type QualityIndicators = {
|
||||||
__typename?: 'QualityIndicators';
|
__typename?: 'QualityIndicators';
|
||||||
|
liquidity?: Maybe<Scalars['Float']>;
|
||||||
|
numForecasters?: Maybe<Scalars['Int']>;
|
||||||
numForecasts?: Maybe<Scalars['Int']>;
|
numForecasts?: Maybe<Scalars['Int']>;
|
||||||
|
openInterest?: Maybe<Scalars['Float']>;
|
||||||
|
sharesVolume?: Maybe<Scalars['Float']>;
|
||||||
|
spread?: Maybe<Scalars['Float']>;
|
||||||
/** 0 to 5 */
|
/** 0 to 5 */
|
||||||
stars: Scalars['Int'];
|
stars: Scalars['Int'];
|
||||||
|
tradeVolume?: Maybe<Scalars['Float']>;
|
||||||
|
volume?: Maybe<Scalars['Float']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Query = {
|
export type Query = {
|
||||||
|
|
|
@ -2,21 +2,21 @@ import * as Types from '../../graphql/types.generated';
|
||||||
|
|
||||||
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
||||||
import { QuestionFragmentDoc } from '../search/queries.generated';
|
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<{
|
export type DashboardByIdQueryVariables = Types.Exact<{
|
||||||
id: Types.Scalars['ID'];
|
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<{
|
export type CreateDashboardMutationVariables = Types.Exact<{
|
||||||
input: Types.CreateDashboardInput;
|
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 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>;
|
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>;
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
const formatQualityIndicator = (indicator) => {
|
import { QuestionFragment } from "../../search/queries.generated";
|
||||||
let result;
|
|
||||||
|
type QualityIndicator = QuestionFragment["qualityIndicators"];
|
||||||
|
type IndicatorName = keyof QualityIndicator;
|
||||||
|
|
||||||
|
const formatQualityIndicator = (indicator: IndicatorName) => {
|
||||||
|
let result: string | null = null;
|
||||||
switch (indicator) {
|
switch (indicator) {
|
||||||
case "numforecasts":
|
case "numForecasts":
|
||||||
result = null;
|
result = null;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -13,38 +18,38 @@ const formatQualityIndicator = (indicator) => {
|
||||||
result = "Volume";
|
result = "Volume";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "numforecasters":
|
case "numForecasters":
|
||||||
result = "Forecasters";
|
result = "Forecasters";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "yes_bid":
|
// case "yesBid":
|
||||||
result = null; // "Yes bid"
|
// result = null; // "Yes bid"
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case "yes_ask":
|
// case "yesAsk":
|
||||||
result = null; // "Yes ask"
|
// result = null; // "Yes ask"
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case "spread":
|
case "spread":
|
||||||
result = "Spread";
|
result = "Spread";
|
||||||
break;
|
break;
|
||||||
case "shares_volume":
|
case "sharesVolume":
|
||||||
result = "Shares vol.";
|
result = "Shares vol.";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "open_interest":
|
case "openInterest":
|
||||||
result = "Interest";
|
result = "Interest";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "resolution_data":
|
// case "resolution_data":
|
||||||
result = null;
|
// result = null;
|
||||||
break;
|
// break;
|
||||||
|
|
||||||
case "liquidity":
|
case "liquidity":
|
||||||
result = "Liquidity";
|
result = "Liquidity";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "tradevolume":
|
case "tradeVolume":
|
||||||
result = "Volume";
|
result = "Volume";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -61,10 +66,10 @@ const formatNumber = (num) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatQualityIndicators = (qualityIndicators: any) => {
|
const formatQualityIndicators = (qualityIndicators: QualityIndicator) => {
|
||||||
let newQualityIndicators = {};
|
let newQualityIndicators: { [k: string]: string | number } = {};
|
||||||
for (let key in qualityIndicators) {
|
for (const key in Object.keys(qualityIndicators)) {
|
||||||
let newKey = formatQualityIndicator(key);
|
const newKey = formatQualityIndicator(key as IndicatorName);
|
||||||
if (newKey) {
|
if (newKey) {
|
||||||
newQualityIndicators[newKey] = qualityIndicators[key];
|
newQualityIndicators[newKey] = qualityIndicators[key];
|
||||||
}
|
}
|
||||||
|
@ -74,7 +79,13 @@ const formatQualityIndicators = (qualityIndicators: any) => {
|
||||||
|
|
||||||
/* Display functions*/
|
/* Display functions*/
|
||||||
|
|
||||||
const getPercentageSymbolIfNeeded = ({ indicator, platform }) => {
|
const getPercentageSymbolIfNeeded = ({
|
||||||
|
indicator,
|
||||||
|
platform,
|
||||||
|
}: {
|
||||||
|
indicator: string;
|
||||||
|
platform: string;
|
||||||
|
}) => {
|
||||||
let indicatorsWhichNeedPercentageSymbol = ["Spread"];
|
let indicatorsWhichNeedPercentageSymbol = ["Spread"];
|
||||||
if (indicatorsWhichNeedPercentageSymbol.includes(indicator)) {
|
if (indicatorsWhichNeedPercentageSymbol.includes(indicator)) {
|
||||||
return "%";
|
return "%";
|
||||||
|
@ -87,7 +98,7 @@ const getCurrencySymbolIfNeeded = ({
|
||||||
indicator,
|
indicator,
|
||||||
platform,
|
platform,
|
||||||
}: {
|
}: {
|
||||||
indicator: any;
|
indicator: string;
|
||||||
platform: string;
|
platform: string;
|
||||||
}) => {
|
}) => {
|
||||||
let indicatorsWhichNeedCurrencySymbol = ["Volume", "Interest", "Liquidity"];
|
let indicatorsWhichNeedCurrencySymbol = ["Volume", "Interest", "Liquidity"];
|
||||||
|
@ -137,7 +148,7 @@ const displayQualityIndicators: React.FC<{
|
||||||
numforecasts: number;
|
numforecasts: number;
|
||||||
lastUpdated: Date;
|
lastUpdated: Date;
|
||||||
showTimeStamp: boolean;
|
showTimeStamp: boolean;
|
||||||
qualityindicators: any;
|
qualityindicators: QuestionFragment["qualityIndicators"];
|
||||||
platform: string; // id string - e.g. "goodjudgment", not "Good Judgment"
|
platform: string; // id string - e.g. "goodjudgment", not "Good Judgment"
|
||||||
}> = ({
|
}> = ({
|
||||||
numforecasts,
|
numforecasts,
|
||||||
|
@ -237,7 +248,7 @@ interface Props {
|
||||||
platform: string;
|
platform: string;
|
||||||
platformLabel: string;
|
platformLabel: string;
|
||||||
numforecasts: any;
|
numforecasts: any;
|
||||||
qualityindicators: any;
|
qualityindicators: QuestionFragment["qualityIndicators"];
|
||||||
lastUpdated: Date;
|
lastUpdated: Date;
|
||||||
showTimeStamp: boolean;
|
showTimeStamp: boolean;
|
||||||
expandFooterToFullWidth: boolean;
|
expandFooterToFullWidth: boolean;
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
import * as Types from '../../graphql/types.generated';
|
import * as Types from '../../graphql/types.generated';
|
||||||
|
|
||||||
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
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 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<{
|
export type SearchQueryVariables = Types.Exact<{
|
||||||
input: Types.SearchInput;
|
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 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>;
|
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>;
|
|
@ -15,6 +15,13 @@ fragment Question on Question {
|
||||||
qualityIndicators {
|
qualityIndicators {
|
||||||
stars
|
stars
|
||||||
numForecasts
|
numForecasts
|
||||||
|
numForecasters
|
||||||
|
volume
|
||||||
|
spread
|
||||||
|
sharesVolume
|
||||||
|
openInterest
|
||||||
|
liquidity
|
||||||
|
tradeVolume
|
||||||
}
|
}
|
||||||
visualization
|
visualization
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user