From 603a501b1e3c4ca8b2e6edbc2fc1a3f071be6977 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Fri, 5 Jun 2020 16:29:19 +0100 Subject: [PATCH] Fix imports --- packages/gatsby/src/bootstrap/index.ts | 2 +- packages/gatsby/src/commands/build.ts | 6 +++--- packages/gatsby/src/commands/develop-process.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/gatsby/src/bootstrap/index.ts b/packages/gatsby/src/bootstrap/index.ts index b50d315c5787b..bb6c515973e4c 100644 --- a/packages/gatsby/src/bootstrap/index.ts +++ b/packages/gatsby/src/bootstrap/index.ts @@ -11,7 +11,7 @@ import { Runner } from "./create-graphql-runner" import { writeOutRedirects } from "../services/write-out-redirects" import { postBootstrap } from "../services/post-bootstrap" -export default async function bootstrap( +export async function bootstrap( context: IBuildContext ): Promise<{ bootstrapGraphQLFunction: Runner }> { const currentContext: IBuildContext = { diff --git a/packages/gatsby/src/commands/build.ts b/packages/gatsby/src/commands/build.ts index e4cb9175ca732..637f8497d761a 100644 --- a/packages/gatsby/src/commands/build.ts +++ b/packages/gatsby/src/commands/build.ts @@ -70,7 +70,7 @@ module.exports = async function build(program: IBuildArgs): Promise { const buildSpan = buildActivity.span buildSpan.setTag(`directory`, program.directory) - const { graphqlRunner: bootstrapGraphQLRunner } = await bootstrap({ + const { bootstrapGraphQLFunction } = await bootstrap({ program, parentSpan: buildSpan, }) @@ -90,7 +90,7 @@ module.exports = async function build(program: IBuildArgs): Promise { }) await apiRunnerNode(`onPreBuild`, { - graphql: bootstrapGraphQLRunner, + graphql: bootstrapGraphQLFunction, parentSpan: buildSpan, }) @@ -255,7 +255,7 @@ module.exports = async function build(program: IBuildArgs): Promise { }) postBuildActivityTimer.start() await apiRunnerNode(`onPostBuild`, { - graphql: bootstrapGraphQLRunner, + graphql: bootstrapGraphQLFunction, parentSpan: buildSpan, }) postBuildActivityTimer.end() diff --git a/packages/gatsby/src/commands/develop-process.ts b/packages/gatsby/src/commands/develop-process.ts index f121ccbd8c148..e82d1bbd8154a 100644 --- a/packages/gatsby/src/commands/develop-process.ts +++ b/packages/gatsby/src/commands/develop-process.ts @@ -16,7 +16,7 @@ import graphiqlExplorer from "gatsby-graphiql-explorer" import { formatError, GraphQLSchema } from "graphql" import webpackConfig from "../utils/webpack.config" -import bootstrap from "../bootstrap" +import { bootstrap } from "../bootstrap" import { store } from "../redux" import { syncStaticDir } from "../utils/get-static-dir" import { buildHTML } from "./build-html" @@ -419,10 +419,10 @@ module.exports = async (program: IProgram): Promise => { } // Start bootstrap process. - const { graphqlRunner } = await bootstrap(program) + const { bootstrapGraphQLFunction } = await bootstrap({ program }) // Start the createPages hot reloader. - bootstrapPageHotReloader(graphqlRunner) + bootstrapPageHotReloader(bootstrapGraphQLFunction) // Start the schema hot reloader. bootstrapSchemaHotReloader()