Skip to content

Commit

Permalink
fix: Update SG codegen urls.
Browse files Browse the repository at this point in the history
  • Loading branch information
johngrantuk committed Jul 5, 2024
1 parent c2bf4cc commit 9c4e62d
Show file tree
Hide file tree
Showing 5 changed files with 486 additions and 4 deletions.
8 changes: 4 additions & 4 deletions balancer-js/src/modules/subgraph/codegen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
overwrite: true
generates:
src/modules/subgraph/generated/balancer-subgraph-types.ts:
schema: ${BALANCER_SUBGRAPH_URL:https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2}
schema: ${BALANCER_SUBGRAPH_URL:https://api.studio.thegraph.com/query/75376/balancer-v2/version/latest}
documents: 'src/modules/subgraph/balancer-v2/**/*.graphql'
plugins:
- typescript
Expand All @@ -13,11 +13,11 @@ generates:
Bytes: string
BigDecimal: string
src/modules/subgraph/generated/balancer-subgraph-schema.graphql:
schema: ${BALANCER_SUBGRAPH_URL:https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2}
schema: ${BALANCER_SUBGRAPH_URL:https://api.studio.thegraph.com/query/75376/balancer-v2/version/latest}
plugins:
- schema-ast
src/modules/subgraph/generated/balancer-gauges.ts:
schema: ${BALANCER_GAUGES_URL:https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges}
schema: ${BALANCER_GAUGES_URL:https://api.studio.thegraph.com/query/75376/balancer-gauges/version/latest}
documents: 'src/modules/subgraph/balancer-gauges/**/*.graphql'
plugins:
- typescript
Expand All @@ -31,7 +31,7 @@ generates:
namingConvention:
enumValues: keep
src/modules/subgraph/generated/balancer-gauges.graphql:
schema: ${BALANCER_GAUGES_URL:https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges}
schema: ${BALANCER_GAUGES_URL:https://api.studio.thegraph.com/query/75376/balancer-gauges/version/latest}
plugins:
- schema-ast
hooks:
Expand Down
94 changes: 94 additions & 0 deletions balancer-js/src/modules/subgraph/generated/balancer-gauges.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ directive @entity on OBJECT
"""Defined a Subgraph ID for an object type"""
directive @subgraphId(id: String!) on OBJECT

enum Aggregation_interval {
day
hour
}

scalar BigDecimal

scalar BigInt
Expand Down Expand Up @@ -99,6 +104,30 @@ enum GaugeFactory_orderBy {
numGauges
}

type GaugeInjector {
""" GaugeInjector contract address """
id: ID!
}

input GaugeInjector_filter {
"""Filter for the block changed event."""
_change_block: BlockChangedFilter
and: [GaugeInjector_filter]
id: ID
id_gt: ID
id_gte: ID
id_in: [ID!]
id_lt: ID
id_lte: ID
id_not: ID
id_not_in: [ID!]
or: [GaugeInjector_filter]
}

enum GaugeInjector_orderBy {
id
}

type GaugeShare {
""" User's balance of gauge deposit tokens """
balance: BigDecimal!
Expand Down Expand Up @@ -1084,6 +1113,34 @@ type Query {
"""
subgraphError: _SubgraphErrorPolicy_! = deny
): GaugeFactory
gaugeInjector(
"""
The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.
"""
block: Block_height
id: ID!

"""
Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.
"""
subgraphError: _SubgraphErrorPolicy_! = deny
): GaugeInjector
gaugeInjectors(
"""
The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.
"""
block: Block_height
first: Int = 100
orderBy: GaugeInjector_orderBy
orderDirection: OrderDirection
skip: Int = 0

"""
Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.
"""
subgraphError: _SubgraphErrorPolicy_! = deny
where: GaugeInjector_filter
): [GaugeInjector!]!
gaugeShare(
"""
The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.
Expand Down Expand Up @@ -1875,6 +1932,34 @@ type Subscription {
"""
subgraphError: _SubgraphErrorPolicy_! = deny
): GaugeFactory
gaugeInjector(
"""
The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.
"""
block: Block_height
id: ID!

"""
Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.
"""
subgraphError: _SubgraphErrorPolicy_! = deny
): GaugeInjector
gaugeInjectors(
"""
The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.
"""
block: Block_height
first: Int = 100
orderBy: GaugeInjector_orderBy
orderDirection: OrderDirection
skip: Int = 0

"""
Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.
"""
subgraphError: _SubgraphErrorPolicy_! = deny
where: GaugeInjector_filter
): [GaugeInjector!]!
gaugeShare(
"""
The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.
Expand Down Expand Up @@ -2257,6 +2342,12 @@ type Subscription {
): [VotingEscrow!]!
}

"""
A string representation of microseconds UNIX timestamp (16 digits)
"""
scalar Timestamp

type User {
""" List of gauge the user has shares """
gaugeShares(first: Int = 100, orderBy: GaugeShare_orderBy, orderDirection: OrderDirection, skip: Int = 0, where: GaugeShare_filter): [GaugeShare!]
Expand Down Expand Up @@ -2504,6 +2595,9 @@ type _Block_ {
"""The block number"""
number: Int!

"""The hash of the parent block"""
parentHash: Bytes

"""Integer representation of the timestamp stored in blocks for the chain"""
timestamp: Int
}
Expand Down
73 changes: 73 additions & 0 deletions balancer-js/src/modules/subgraph/generated/balancer-gauges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ export type Scalars = {
BigInt: string;
Bytes: string;
Int8: any;
Timestamp: any;
};

export enum Aggregation_Interval {
day = 'day',
hour = 'hour'
}

export type BlockChangedFilter = {
number_gte: Scalars['Int'];
};
Expand Down Expand Up @@ -104,6 +110,31 @@ export enum GaugeFactory_OrderBy {
numGauges = 'numGauges'
}

export type GaugeInjector = {
__typename?: 'GaugeInjector';
/** GaugeInjector contract address */
id: Scalars['ID'];
};

export type GaugeInjector_Filter = {
/** Filter for the block changed event. */
_change_block?: InputMaybe<BlockChangedFilter>;
and?: InputMaybe<Array<InputMaybe<GaugeInjector_Filter>>>;
id?: InputMaybe<Scalars['ID']>;
id_gt?: InputMaybe<Scalars['ID']>;
id_gte?: InputMaybe<Scalars['ID']>;
id_in?: InputMaybe<Array<Scalars['ID']>>;
id_lt?: InputMaybe<Scalars['ID']>;
id_lte?: InputMaybe<Scalars['ID']>;
id_not?: InputMaybe<Scalars['ID']>;
id_not_in?: InputMaybe<Array<Scalars['ID']>>;
or?: InputMaybe<Array<InputMaybe<GaugeInjector_Filter>>>;
};

export enum GaugeInjector_OrderBy {
id = 'id'
}

export type GaugeShare = {
__typename?: 'GaugeShare';
/** User's balance of gauge deposit tokens */
Expand Down Expand Up @@ -1039,6 +1070,8 @@ export type Query = {
gauge?: Maybe<Gauge>;
gaugeFactories: Array<GaugeFactory>;
gaugeFactory?: Maybe<GaugeFactory>;
gaugeInjector?: Maybe<GaugeInjector>;
gaugeInjectors: Array<GaugeInjector>;
gaugeShare?: Maybe<GaugeShare>;
gaugeShares: Array<GaugeShare>;
gaugeType?: Maybe<GaugeType>;
Expand Down Expand Up @@ -1099,6 +1132,24 @@ export type QueryGaugeFactoryArgs = {
};


export type QueryGaugeInjectorArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID'];
subgraphError?: _SubgraphErrorPolicy_;
};


export type QueryGaugeInjectorsArgs = {
block?: InputMaybe<Block_Height>;
first?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<GaugeInjector_OrderBy>;
orderDirection?: InputMaybe<OrderDirection>;
skip?: InputMaybe<Scalars['Int']>;
subgraphError?: _SubgraphErrorPolicy_;
where?: InputMaybe<GaugeInjector_Filter>;
};


export type QueryGaugeShareArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID'];
Expand Down Expand Up @@ -1700,6 +1751,8 @@ export type Subscription = {
gauge?: Maybe<Gauge>;
gaugeFactories: Array<GaugeFactory>;
gaugeFactory?: Maybe<GaugeFactory>;
gaugeInjector?: Maybe<GaugeInjector>;
gaugeInjectors: Array<GaugeInjector>;
gaugeShare?: Maybe<GaugeShare>;
gaugeShares: Array<GaugeShare>;
gaugeType?: Maybe<GaugeType>;
Expand Down Expand Up @@ -1760,6 +1813,24 @@ export type SubscriptionGaugeFactoryArgs = {
};


export type SubscriptionGaugeInjectorArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID'];
subgraphError?: _SubgraphErrorPolicy_;
};


export type SubscriptionGaugeInjectorsArgs = {
block?: InputMaybe<Block_Height>;
first?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<GaugeInjector_OrderBy>;
orderDirection?: InputMaybe<OrderDirection>;
skip?: InputMaybe<Scalars['Int']>;
subgraphError?: _SubgraphErrorPolicy_;
where?: InputMaybe<GaugeInjector_Filter>;
};


export type SubscriptionGaugeShareArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID'];
Expand Down Expand Up @@ -2291,6 +2362,8 @@ export type _Block_ = {
hash?: Maybe<Scalars['Bytes']>;
/** The block number */
number: Scalars['Int'];
/** The hash of the parent block */
parentHash?: Maybe<Scalars['Bytes']>;
/** Integer representation of the timestamp stored in blocks for the chain */
timestamp?: Maybe<Scalars['Int']>;
};
Expand Down
Loading

0 comments on commit 9c4e62d

Please sign in to comment.