-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Labels
type: question or discussionIssue discussing or asking a question about gqlIssue discussing or asking a question about gql
Description
This works in an online query tool:
transactionBlock(digest:"CypToNgx6jN2V6vDZGtgpeEv1zSs4VGJcANJi85w9Ypm") {
digest
kind {
__typename
... on ProgrammableTransaction {
value
}
... on GenesisTransaction {
objects
}
}
}
However I can't figure out the DSL Fragment for handling the union. If I have one of the union types it works fine:
STANDARD_TRANSACTION_KIND: DSLFragment = (
DSLFragment("TransactionUnion")
.on(SUI_GRAPHQL_SCHEMA.ProgrammableTransaction)
.select(SUI_GRAPHQL_SCHEMA.ProgrammableTransaction.value)
)
However; not sure how to handle all cases. Do I need to declare a fragment for all union types? And, if so, do I just comma separate them in the query?
Also, sorry if this is not the place for questions... please direct me otherwise.
Metadata
Metadata
Assignees
Labels
type: question or discussionIssue discussing or asking a question about gqlIssue discussing or asking a question about gql