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

fix(graph): use the JWT correctly in refetchAndGenerateFromOneGraph #4832

Merged
merged 3 commits into from
Jul 19, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"Joshua T. (http://localhost:8080)",
"JoΓ£o Antunes <me@jgantunes.com> (https://twitter.com/jgantunes)",
"Karagulamos (https://twitter.com/karagulamos)",
"Karin Hendrikse (khendrikse.netlify.app)",
"Kaspar Emanuel <kaspar@monostable.co.uk> (https://twitter.com/kaspar_e)",
"Keiko Oda (https://keikooda.net/)",
"Krasimir Nedelchev (https://github.com/kaykayehnn)",
Expand Down
5 changes: 3 additions & 2 deletions src/commands/graph/graph-pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const graphPull = async (options, command) => {
const netlifyToken = await command.authenticate()
const siteId = site.id

await refetchAndGenerateFromOneGraph({ logger: log, netlifyGraphConfig, netlifyToken, state, siteId })
const { jwt } = await OneGraphCliClient.getGraphJwtForSite({ siteId, nfToken: netlifyToken })

await refetchAndGenerateFromOneGraph({ logger: log, netlifyGraphConfig, jwt, state, siteId })

const oneGraphSessionId = loadCLISession(state)

Expand All @@ -56,7 +58,6 @@ const graphPull = async (options, command) => {
error(`Failed to fetch and update Netlify GraphQL schema`)
}

const { jwt } = await OneGraphCliClient.getGraphJwtForSite({ siteId, nfToken: netlifyToken })
const next = await OneGraphCliClient.fetchCliSessionEvents({
appId: siteId,
jwt,
Expand Down