Skip to content

Instantly share code, notes, and snippets.

@PaulRBerg
Created May 18, 2019 21:47

Revisions

  1. PaulRBerg created this gist May 18, 2019.
    76 changes: 76 additions & 0 deletions queries.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,76 @@
    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
    }
    }
    }
    }
    `;