https://media.graphcms.com/quality=value:100/resize=height:100/auto_image/lOXvIyIHQzyM8sbCLOo2
  • Home
  • Examples
    Native features
    SSR (getServerSideProps)SSGSSG using fallbackSSG using revalidateCatch-all routes
    Built-in features
    HostingStages & secretsCI/CDStatic i18nMonitoringCSS-in-JSCookies consentAnalyticsIconsCSS AnimationsUI components libraryDocs site
    Built-in utilities
    I18nLink componentHooksAPIErrors handlingBundle analysisSVG to ReactSecurity auditTracking useless re-renders
  • Documentation
  • Source code
  • Go to CMS

Built-in utilities

  • I18nLink component
  • Hooks
  • API
  • Errors handling
  • Bundle analysis
  • SVG to React
  • Security audit
  • Tracking useless re-renders

Previous section - Home

Api examples

A few API endpoints are provided as utilities:
  • /api/status : Meant to help you debug your app and check non-sensitive environment variables on staging/production stages.
    It contains a few metadata that should help you manage your app (build time, stage, region, release, etc.)
  • /api/error : Meant to help you test your server-side Sentry integration, will throw errors on purpose so you can check whether they're reporting into Sentry.
  • /api/autoRedirectToLocalisedPage : Meant to detect the browser preferred locale (based on HTTP headers) and redirect to the localised version of the page.
    It is used in Next.js experimental rewrites in next.config.js to automatically redirect to this endpoint all requests that don't have a locale defined in the url.
    For instance, going to /terms should redirect to the fr or en page, depending on your browser language preferences.
https://media.graphcms.com/lOXvIyIHQzyM8sbCLOo2

Customer 1 - 2021
All rights reserved

Terms
Politique de confidentialité
/static/images/LOGO_Powered_by_UNLY_BLACK_BLUE.svg