Skip to content

Instantly share code, notes, and snippets.

@PaulRBerg
Created May 18, 2019 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulRBerg/e4db3a4f06a009d8ae20086fdc925198 to your computer and use it in GitHub Desktop.
Save PaulRBerg/e4db3a4f06a009d8ae20086fdc925198 to your computer and use it in GitHub Desktop.
Apollo query for StackOverflow question
import gql from "graphql-tag";
export const GET_STREAMS = gql`
query Streams($owner: String!) {
streams(orderBy: id, orderDirection: desc, where: { owner: $owner }) {
id
flow
owner
rawStream {
id
interval
payment
recipient
redeemal {
id
recipientAmount
senderAmount
}
sender
startBlock
status
stopBlock
token {
id
decimals
name
symbol
}
txs {
id
}
withdrawals {
id
amount
}
}
}
}
`;
export const GET_STREAM = gql`
query Stream($streamId: ID!) {
stream(id: $streamId) {
id
flow
rawStream {
id
interval
payment
recipient
redeemal {
id
recipientAmount
senderAmount
}
sender
startBlock
status
stopBlock
token {
id
decimals
name
symbol
}
txs {
id
}
withdrawals {
id
amount
}
}
}
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment