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(graph): update graph helpers to work better with next.js #354

Merged
merged 2 commits into from Aug 12, 2022

Conversation

dwwoelfel
Copy link
Contributor

@dwwoelfel dwwoelfel commented Aug 12, 2022

Follow up to #326

Exports two new functions getSecretsForBuild and getNetlifyGraphTokenForBuild that can be used with getStaticProps in next.js (along with netlify/next-runtime#1525). They can also be used during a normal netlify build.

Also falls back to reading the token from the environment variable in dev mode since next.js does not run the header-injection code from the netlify cli in dev mode.

@dwwoelfel dwwoelfel added the type: chore work needed to keep the product and development running smoothly label Aug 12, 2022
@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Aug 12, 2022
@dwwoelfel dwwoelfel marked this pull request as ready for review August 12, 2022 20:45
Copy link
Contributor

@anmonteiro anmonteiro left a comment

Choose a reason for hiding this comment

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

LGTM

@kodiakhq kodiakhq bot merged commit b854652 into main Aug 12, 2022
@kodiakhq kodiakhq bot deleted the dww/better-nextjs-support branch August 12, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants