Skip to content

Commit

Permalink
fix: sean's review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Aug 4, 2022
1 parent d5f88d3 commit 8bb5956
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/one-graph/cli-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ const updateGraphQLOperationsFileFromPersistedDoc = (input) => {
*/
const handleOperationsLibraryPersistedEvent = async (input) => {
const { schemaId, siteRoot } = input
// await updateGraphQLOperationsFileFromPersistedDoc()
const operationsFileContents = await fetchGraphQLOperationsLibraryFromPersistedDoc(input)

if (!operationsFileContents) {
Expand Down Expand Up @@ -827,7 +826,7 @@ const generateSessionName = () => {
* @param {string} input.netlifyToken The (typically netlify) access token that is used for authentication, if any
* @param {NetlifyGraphLockfile.V0_format | undefined} input.lockfile A function to call to set/get the current state of the local Netlify project
*/
const maybeUpdateSessionFromLockfile = async (input) => {
const idempotentlyUpdateSessionSchemaIdFromLockfile = async (input) => {
const { lockfile, netlifyToken, session } = input
const sessionSchemaId = session.metadata && session.metadata.schemaId
const lockfileSchemaId = lockfile && lockfile.locked.schemaId
Expand Down Expand Up @@ -893,7 +892,7 @@ const ensureCLISession = async (input) => {
writeLockfile({ siteRoot: site.root, lockfile: newLockfile })
}

await maybeUpdateSessionFromLockfile({ session, lockfile, netlifyToken })
await idempotentlyUpdateSessionSchemaIdFromLockfile({ session, lockfile, netlifyToken })
}
} catch (fetchSessionError) {
warn(`Unable to fetch cli session events: ${JSON.stringify(fetchSessionError, null, 2)}`)
Expand Down

0 comments on commit 8bb5956

Please sign in to comment.