Skip to content

Instantly share code, notes, and snippets.

@nichanank
Created April 30, 2020 16:20
Show Gist options
  • Save nichanank/98abb382633ce2b794fed03dd85c3c8f to your computer and use it in GitHub Desktop.
Save nichanank/98abb382633ce2b794fed03dd85c3c8f to your computer and use it in GitHub Desktop.
// this returns two arrays, one containing Streams where the user was the sender (senderStreams) and another in which the user was a recipient (recipientStreams)
const MY_STREAMS = gql`
query streams($account: String!) {
senderStreams:streams(where: {sender: $account}){
id
recipient
deposit
startTime
stopTime
}
recipientStreams:streams(where: {recipient: $account}) {
id
sender
deposit
startTime
stopTime
}
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment