Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(examples): use experimental edge runtime with grafbase #42992

Merged
merged 3 commits into from Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/with-grafbase/lib/grafbase.ts
Expand Up @@ -7,5 +7,6 @@ export const grafbase = new GraphQLClient(
headers: {
'x-api-key': process.env.GRAFBASE_API_KEY as string,
},
fetch,
}
)
1 change: 1 addition & 0 deletions examples/with-grafbase/next.config.js
Expand Up @@ -4,6 +4,7 @@ const nextConfig = {
swcMinify: true,
experimental: {
appDir: true,
runtime: 'experimental-edge',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this to the root config will currently make all app paths dynamic and revalidate won't be able to be honored currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👌

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the mentioned behavior desired? If so it may confuse users as revalidate is being configured but not used here.

Copy link
Contributor Author

@notrab notrab Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijjk I totally missed revalidate was still exported. Thank you

I will update this to be export const revalidate = 0 so it's always rendered dynamically or remove it completely...

},
}

Expand Down