fix(trading): add team id to games query (#5921)
This commit is contained in:
parent
ad6f0c5798
commit
0d39c2354c
@ -25,8 +25,12 @@ fragment GameFields on Game {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
query Games($epochFrom: Int) {
|
query Games($epochFrom: Int, $teamId: ID) {
|
||||||
games(epochFrom: $epochFrom, entityScope: ENTITY_SCOPE_TEAMS) {
|
games(
|
||||||
|
epochFrom: $epochFrom
|
||||||
|
teamId: $teamId
|
||||||
|
entityScope: ENTITY_SCOPE_TEAMS
|
||||||
|
) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
...GameFields
|
...GameFields
|
||||||
|
6
apps/trading/lib/hooks/__generated__/Games.ts
generated
6
apps/trading/lib/hooks/__generated__/Games.ts
generated
@ -9,6 +9,7 @@ export type GameFieldsFragment = { __typename?: 'Game', id: string, epoch: numbe
|
|||||||
|
|
||||||
export type GamesQueryVariables = Types.Exact<{
|
export type GamesQueryVariables = Types.Exact<{
|
||||||
epochFrom?: Types.InputMaybe<Types.Scalars['Int']>;
|
epochFrom?: Types.InputMaybe<Types.Scalars['Int']>;
|
||||||
|
teamId?: Types.InputMaybe<Types.Scalars['ID']>;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
@ -44,8 +45,8 @@ export const GameFieldsFragmentDoc = gql`
|
|||||||
}
|
}
|
||||||
${TeamEntityFragmentDoc}`;
|
${TeamEntityFragmentDoc}`;
|
||||||
export const GamesDocument = gql`
|
export const GamesDocument = gql`
|
||||||
query Games($epochFrom: Int) {
|
query Games($epochFrom: Int, $teamId: ID) {
|
||||||
games(epochFrom: $epochFrom, entityScope: ENTITY_SCOPE_TEAMS) {
|
games(epochFrom: $epochFrom, teamId: $teamId, entityScope: ENTITY_SCOPE_TEAMS) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
...GameFields
|
...GameFields
|
||||||
@ -68,6 +69,7 @@ export const GamesDocument = gql`
|
|||||||
* const { data, loading, error } = useGamesQuery({
|
* const { data, loading, error } = useGamesQuery({
|
||||||
* variables: {
|
* variables: {
|
||||||
* epochFrom: // value for 'epochFrom'
|
* epochFrom: // value for 'epochFrom'
|
||||||
|
* teamId: // value for 'teamId'
|
||||||
* },
|
* },
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
|
@ -51,6 +51,7 @@ export const useGames = (teamId?: string, epochFrom?: number): GamesData => {
|
|||||||
const { data, loading, error } = useGamesQuery({
|
const { data, loading, error } = useGamesQuery({
|
||||||
variables: {
|
variables: {
|
||||||
epochFrom: from,
|
epochFrom: from,
|
||||||
|
teamId: teamId,
|
||||||
},
|
},
|
||||||
skip: !from,
|
skip: !from,
|
||||||
fetchPolicy: 'cache-and-network',
|
fetchPolicy: 'cache-and-network',
|
||||||
|
12
libs/types/src/__generated__/types.ts
generated
12
libs/types/src/__generated__/types.ts
generated
@ -936,6 +936,8 @@ export enum DispatchMetric {
|
|||||||
/** Dispatch strategy for a recurring transfer */
|
/** Dispatch strategy for a recurring transfer */
|
||||||
export type DispatchStrategy = {
|
export type DispatchStrategy = {
|
||||||
__typename?: 'DispatchStrategy';
|
__typename?: 'DispatchStrategy';
|
||||||
|
/** Optional multiplier on taker fees used to cap the rewards a party may receive in an epoch */
|
||||||
|
capRewardFeeMultiple?: Maybe<Scalars['String']>;
|
||||||
/** Defines the data that will be used to compare markets so as to distribute rewards appropriately */
|
/** Defines the data that will be used to compare markets so as to distribute rewards appropriately */
|
||||||
dispatchMetric: DispatchMetric;
|
dispatchMetric: DispatchMetric;
|
||||||
/** The asset to use for measuring contribution to the metric */
|
/** The asset to use for measuring contribution to the metric */
|
||||||
@ -2391,6 +2393,8 @@ export type Market = {
|
|||||||
state: MarketState;
|
state: MarketState;
|
||||||
/** Optional: Market ID of the successor to this market if one exists */
|
/** Optional: Market ID of the successor to this market if one exists */
|
||||||
successorMarketID?: Maybe<Scalars['ID']>;
|
successorMarketID?: Maybe<Scalars['ID']>;
|
||||||
|
/** The market minimum tick size */
|
||||||
|
tickSize: Scalars['String'];
|
||||||
/** An instance of, or reference to, a tradable instrument. */
|
/** An instance of, or reference to, a tradable instrument. */
|
||||||
tradableInstrument: TradableInstrument;
|
tradableInstrument: TradableInstrument;
|
||||||
/** @deprecated Simplify and consolidate trades query and remove nesting. Use trades query instead */
|
/** @deprecated Simplify and consolidate trades query and remove nesting. Use trades query instead */
|
||||||
@ -2816,6 +2820,8 @@ export type NewMarket = {
|
|||||||
riskParameters: RiskModel;
|
riskParameters: RiskModel;
|
||||||
/** Successor market configuration. If this proposed market is meant to succeed a given market, then this needs to be set. */
|
/** Successor market configuration. If this proposed market is meant to succeed a given market, then this needs to be set. */
|
||||||
successorConfiguration?: Maybe<SuccessorConfiguration>;
|
successorConfiguration?: Maybe<SuccessorConfiguration>;
|
||||||
|
/** The market minimum tick size */
|
||||||
|
tickSize: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Configuration for a new spot market on Vega */
|
/** Configuration for a new spot market on Vega */
|
||||||
@ -2839,6 +2845,8 @@ export type NewSpotMarket = {
|
|||||||
riskParameters?: Maybe<RiskModel>;
|
riskParameters?: Maybe<RiskModel>;
|
||||||
/** Specifies parameters related to liquidity target stake calculation */
|
/** Specifies parameters related to liquidity target stake calculation */
|
||||||
targetStakeParameters: TargetStakeParameters;
|
targetStakeParameters: TargetStakeParameters;
|
||||||
|
/** The market minimum tick size */
|
||||||
|
tickSize: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type NewTransfer = {
|
export type NewTransfer = {
|
||||||
@ -7074,6 +7082,8 @@ export type UpdateMarketConfiguration = {
|
|||||||
quadraticSlippageFactor: Scalars['String'];
|
quadraticSlippageFactor: Scalars['String'];
|
||||||
/** Updated futures market risk model parameters. */
|
/** Updated futures market risk model parameters. */
|
||||||
riskParameters: UpdateMarketRiskParameters;
|
riskParameters: UpdateMarketRiskParameters;
|
||||||
|
/** The market minimum tick size */
|
||||||
|
tickSize: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateMarketLogNormalRiskModel = {
|
export type UpdateMarketLogNormalRiskModel = {
|
||||||
@ -7171,6 +7181,8 @@ export type UpdateSpotMarketConfiguration = {
|
|||||||
riskParameters: RiskModel;
|
riskParameters: RiskModel;
|
||||||
/** Specifies parameters related to target stake calculation */
|
/** Specifies parameters related to target stake calculation */
|
||||||
targetStakeParameters: TargetStakeParameters;
|
targetStakeParameters: TargetStakeParameters;
|
||||||
|
/** The market minimum tick size */
|
||||||
|
tickSize: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateVolumeDiscountProgram = {
|
export type UpdateVolumeDiscountProgram = {
|
||||||
|
Loading…
Reference in New Issue
Block a user