title: Gatsby overwrite a static page (createPages) with a dynamic one?
body: <p>We have a user platform project. Every user has a profile detail page (/{id}} we create during build with createPages(). When the user who is logged in makes changes to his profile they will persist in the database, but the changes will not be visible to him until the build is triggered again. The user might think his changes are lost and might get frustrated. Our ideal solution would be to show the profile of the user that is logged in dynamically.</p>
  <p>Is it possible to overwrite a static created page with a dynamic page on the same url? We want to keep the url the same (/{id}) because the user will share his link with other users.</p>
  <pre><code>// Generation of static pages
  exports.createPages = async function ({ actions, graphql }) {
    const { data } = await graphql(`
      query {
        apollo {
          allProfiles {
            email
            id
          }
        }
      }
    `)
    data.apollo.allProfiles.forEach((profile) =&gt; {
      const email = profile.email
      const id = profile.id
      actions.createPage({
        path: id,
        component: require.resolve(`./src/templates/profile-detail.js`),
        context: { email: email },
      })
    })
  }
  </code></pre>