Unfortunately, extraScriptProps does not solve the CSP nonce problem for apps with mix of static and dynamic pages.
In a typical Next.js App Router setup, ApolloNextAppProvider is rendered inside a client Providers component mounted from the root layout. To pass a per-request nonce via extraScriptProps, the app has to read the x-nonce header in that layout.
However, reading headers in a layout makes that layout and all nested routes dynamic in Next.js. This means there is currently no practical way to use extraScriptProps for a per-request nonce without making the whole subtree under that layout dynamic.
Originally posted by @maximkuzminykh in #401
Originally posted by @maximkuzminykh in #401