Skip to content

Commit c7cf89c

Browse files
authored
fix: convert ETH tuple array to GraphQL bytes array (#1351)
1 parent 308cb8a commit c7cf89c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/hungry-crabs-promise.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphprotocol/graph-cli': patch
3+
---
4+
5+
return tuple arrays as a Bytes array in GraphQL

packages/cli/src/codegen/types/conversions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ const ASSEMBLYSCRIPT_TO_VALUE = [
312312
],
313313
['Array<Array<string>>', /\[\[.*\]\]/, (code: any) => `Value.fromStringMatrix(${code})`],
314314
['Array<Array<string | null>>', null, (code: any) => `Value.fromStringMatrix(${code})`], // is this overwriting the Array null below?
315-
315+
['Array<ethereum.Tuple>', '[Bytes]', (code: any) => `Value.fromArray(${code})`],
316316
// Arrays
317317

318318
['Array<Address>', '[Bytes]', (code: any) => `Value.fromBytesArray(${code})`],

0 commit comments

Comments
 (0)