mutation SubscribeFeed($input: SubscribeFeedInput!) {
  subscribeFeed(input: $input) {
    __typename
    ... on SubscribeFeedSuccess {
      feed {
        ...Feed
      }
      status {
        code
      }
    }
    ... on SubscribeFeedError {
      status {
        code
      }
    }
  }
}

mutation UnsubscribeFeed($input: UnsubscribeFeedInput!) {
  unsubscribeFeed(input: $input) {
    __typename
    ... on UnsubscribeFeedSuccess {
      status {
        code
      }
    }
    ... on UnsubscribeFeedError {
      status {
        code
      }
    }
  }
}

fragment Feed on Feed {
  id
  title
  url
  updated
  websiteUrl
  description
  entries(first: 10) {
    nodes {
      ...EntryMeta
    }
  }
  links {
    nodes {
      ...Link
    }
  }
}

fragment EntryMeta on Entry {
    title,
    published,
    summary,
}

fragment Link on Link {
  href
  rel
  mediaType
  title  
}
