Skip to content

Instantly share code, notes, and snippets.

@brianlovin
Last active May 1, 2017 18:36
Show Gist options
  • Select an option

  • Save brianlovin/658b53219b49e442ab8ba8a3a26c7249 to your computer and use it in GitHub Desktop.

Select an option

Save brianlovin/658b53219b49e442ab8ba8a3a26c7249 to your computer and use it in GitHub Desktop.

Revisions

  1. brianlovin revised this gist May 1, 2017. 1 changed file with 0 additions and 8 deletions.
    8 changes: 0 additions & 8 deletions frequency.js
    Original file line number Diff line number Diff line change
    @@ -2,14 +2,6 @@ import { gql } from 'react-apollo';
    import { userFragments } from './user'

    export const frequencyFragments = {
    frequencyInfo: gql`
    fragment frequencyInfo on Frequency {
    id
    name
    slug
    description
    }
    `,
    frequencySubscribers: gql`
    fragment frequencySubscribers on Frequency {
    subscriberConnection {
  2. brianlovin created this gist May 1, 2017.
    29 changes: 29 additions & 0 deletions frequency.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    import { gql } from 'react-apollo';
    import { userFragments } from './user'

    export const frequencyFragments = {
    frequencyInfo: gql`
    fragment frequencyInfo on Frequency {
    id
    name
    slug
    description
    }
    `,
    frequencySubscribers: gql`
    fragment frequencySubscribers on Frequency {
    subscriberConnection {
    pageInfo {
    hasNextPage
    hasPreviousPage
    }
    edges {
    node {
    ...userInfo
    }
    }
    }
    }
    ${userFragments.userInfo}
    `
    }
    12 changes: 12 additions & 0 deletions user.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    import { gql } from 'react-apollo';

    export const userFragments = {
    userInfo: gql`
    fragment userInfo on User {
    uid
    photoURL
    displayName
    username
    }
    `
    }