From 4b58d21cfdc30c9079697f427cb80e972d493083 Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Tue, 10 Dec 2019 10:14:34 -0800 Subject: [PATCH] [core] Initialize plugin configs before resolving GraphQL schema --- packages/@sanity/core/src/actions/graphql/deployApiAction.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/@sanity/core/src/actions/graphql/deployApiAction.js b/packages/@sanity/core/src/actions/graphql/deployApiAction.js index 8aec775da74..626cace4ed3 100644 --- a/packages/@sanity/core/src/actions/graphql/deployApiAction.js +++ b/packages/@sanity/core/src/actions/graphql/deployApiAction.js @@ -1,3 +1,4 @@ +const {tryInitializePluginConfigs} = require('../config/reinitializePluginConfigs') const getSanitySchema = require('./getSanitySchema') const extractFromSanitySchema = require('./extractFromSanitySchema') const generateTypeQueries = require('./generateTypeQueries') @@ -6,6 +7,9 @@ const SchemaError = require('./SchemaError') module.exports = async function deployApiActions(args, context) { const {apiClient, workDir, output, prompt} = context + + await tryInitializePluginConfigs({workDir, output, env: 'production'}) + const flags = args.extOptions const client = apiClient({