Skip to content

Commit

Permalink
fix: graph code generator TOML injection (#5053)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
anmonteiro and kodiakhq[bot] authored Sep 16, 2022
1 parent ee66401 commit 6ab0493
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/one-graph/cli-netlify-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ${entry}`
const codegenKeyLine = lines.findIndex((line) => line.trim().startsWith('codeGenerator'))
const hasCodegenKeyLine = codegenKeyLine !== 1

if (hasCodegenKeyLine) {
if (hasGraphKey && hasCodegenKeyLine) {
lines.splice(codegenKeyLine, 1, entry)
} else if (hasGraphKey) {
lines.splice(graphKeyLine, 0, entry)
Expand Down Expand Up @@ -1017,7 +1017,6 @@ module.exports = {
buildSchema,
defaultExampleOperationsDoc: NetlifyGraph.defaultExampleOperationsDoc,
extractFunctionsFromOperationDoc: NetlifyGraph.extractFunctionsFromOperationDoc,
generateFunctionsSource: NetlifyGraph.generateFunctionsSource,
generateFunctionsFile,
generateHandlerSource: NetlifyGraph.generateHandlerSource,
generateHandlerByOperationId,
Expand Down

1 comment on commit 6ab0493

@github-actions
Copy link

Choose a reason for hiding this comment

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

📊 Benchmark results

Package size: 223 MB

Please sign in to comment.