Skip to content

Commit 44175f6

Browse files
authored
feat(gatsby): add flag to disable schema rebuilding (#26291)
1 parent 82e5a75 commit 44175f6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/gatsby/src/services/build-schema.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ import { IDataLayerContext } from "../state-machines/data-layer/types"
44

55
export async function buildSchema({
66
parentSpan,
7+
refresh,
78
}: Partial<IDataLayerContext>): Promise<void> {
9+
if (
10+
refresh &&
11+
Boolean(process.env.GATSBY_EXPERIMENTAL_DISABLE_SCHEMA_REBUILD)
12+
) {
13+
return
14+
}
815
const activity = reporter.activityTimer(`building schema`, {
916
parentSpan,
1017
})

0 commit comments

Comments
 (0)