Skip to content

Commit

Permalink
fix(gatsby-cli): only run recipes graphql when admin is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Sep 25, 2020
1 parent a2b6726 commit 648a05d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatsby-cli/src/create-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ function buildLocalCommands(cli: yargs.Argv, isLocalSite: boolean): void {
handler: handlerP(
getCommandHandler(`develop`, (args: yargs.Arguments, cmd: Function) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
startGraphQLServer(siteInfo.directory, true)

// Only run recipes when admin is enabled
if (process.env.GATSBY_EXPERIMENTAL_ENABLE_ADMIN) {
startGraphQLServer(siteInfo.directory, true)
}

if (args.hasOwnProperty(`inspect`)) {
args.inspect = args.inspect || 9229
Expand Down

0 comments on commit 648a05d

Please sign in to comment.