Skip to content

Commit

Permalink
adjust query to support ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
45930 committed Oct 22, 2024
1 parent 4f99683 commit 3f9264d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ type EventData {
type ActionData {
accountUpdateId: String!
transactionInfo: TransactionInfo
sequenceNumber: Int!
zkappAccountUpdateIds: [Int]!
zkappEventElementIds: [Int]!
data: [String]!
}

Expand Down
3 changes: 3 additions & 0 deletions src/blockchain/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export type Action = {
accountUpdateId: string;
transactionInfo: TransactionInfo;
data: string[];
sequenceNumber: number;
zkappAccountUpdateIds: number[];
zkappEventElementIds: number[];
};

export type BlockInfo = {
Expand Down
1 change: 1 addition & 0 deletions src/db/sql/events-actions/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function emittedZkAppCommandsCTE(db_client: postgres.Sql) {
SELECT
blocks_accessed.*,
zkcu.id AS zkapp_account_update_id,
bzkc.sequence_no,
zkapp_fee_payer_body_id,
zkapp_account_updates_ids,
authorization_kind,
Expand Down
14 changes: 14 additions & 0 deletions src/resolvers-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export type ActionData = {
__typename?: 'ActionData';
accountUpdateId: Scalars['String']['output'];
data: Array<Maybe<Scalars['String']['output']>>;
sequenceNumber: Scalars['Int']['output'];
transactionInfo?: Maybe<TransactionInfo>;
zkappAccountUpdateIds: Array<Maybe<Scalars['Int']['output']>>;
zkappEventElementIds: Array<Maybe<Scalars['Int']['output']>>;
};

export type ActionFilterOptionsInput = {
Expand Down Expand Up @@ -278,11 +281,22 @@ export type ActionDataResolvers<
ParentType,
ContextType
>;
sequenceNumber?: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
transactionInfo?: Resolver<
Maybe<ResolversTypes['TransactionInfo']>,
ParentType,
ContextType
>;
zkappAccountUpdateIds?: Resolver<
Array<Maybe<ResolversTypes['Int']>>,
ParentType,
ContextType
>;
zkappEventElementIds?: Resolver<
Array<Maybe<ResolversTypes['Int']>>,
ParentType,
ContextType
>;
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
};

Expand Down

0 comments on commit 3f9264d

Please sign in to comment.