Skip to content

Commit

Permalink
graphQL augment to work with relay solana-labs#2407
Browse files Browse the repository at this point in the history
  • Loading branch information
tibi77 committed Apr 30, 2024
1 parent 3ae70f0 commit c5f12d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/rpc-graphql/src/__tests__/transaction-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ describe('transaction', () => {
query testQuery($signature: Signature!) {
transaction(signature: $signature) {
blockTime
id
slot
}
}
Expand All @@ -68,10 +69,12 @@ describe('transaction', () => {
data: {
transaction: {
blockTime: expect.any(BigInt),
id: expect.any(String),
slot: expect.any(BigInt),
},
},
});
expect(result?.data?.transaction?.id).toBe(signature);
});
it("can query a transaction's computeUnitsConsumed from it's meta", async () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions packages/rpc-graphql/src/schema/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const transactionTypeDefs = /* GraphQL */ `
A Solana transaction
"""
type Transaction {
id: Signature!
blockTime: BigInt
data(encoding: TransactionEncoding!): String
message: TransactionMessage
Expand Down

0 comments on commit c5f12d1

Please sign in to comment.