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
Changes from all 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
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