Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Archives #2

Closed
3 tasks
gregrickaby opened this issue Jun 26, 2020 · 0 comments
Closed
3 tasks

Archives #2

gregrickaby opened this issue Jun 26, 2020 · 0 comments

Comments

@gregrickaby
Copy link
Contributor

gregrickaby commented Jun 26, 2020

Categories, tags, and authors are displayed-- but are not linked to an archive page.

Create:

  • Author archive
  • Category archive
  • Tag archive

Example query to get all posts written by: greg@webdevstudios.com

query MyQuery {
  user(id: "greg@webdevstudios.com", idType: EMAIL) {
    posts {
      edges {
        node {
          title
          slug
        }
      }
    }
  }
}

Example query to get all posts in "Blog" category:

query MyQuery {
  category(id: "blog", idType: SLUG) {
    slug
    posts {
      edges {
        node {
          author {
            name
          }
          title
          slug
          date
          excerpt
          featuredImage {
            sourceUrl(size: LARGE)
          }
        }
      }
    }
  }
}

Example query to get all posts tagged with "nextjs":

query MyQuery {
  tag(id: "nextjs", idType: SLUG) {
    slug
    posts {
      edges {
        node {
          author {
            name
          }
          title
          slug
          date
          excerpt
          featuredImage {
            sourceUrl(size: LARGE)
          }
        }
      }
    }
  }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant