A snippet with GraphQL to show all site pages (the path and some fields of the page context).

query AllSitePages {
    allSitePage{
        edges {
            node {
                path
                context {
                    posts {
                        slug
                    }
                    frontmatter {
                        title
                    }
                }
            }
        }
    }
}