diff --git a/script/graphql/update-files.js b/script/graphql/update-files.js index d68f210100d7..6f95a3f906c8 100755 --- a/script/graphql/update-files.js +++ b/script/graphql/update-files.js @@ -10,7 +10,6 @@ import processPreviews from './utils/process-previews.js' import processUpcomingChanges from './utils/process-upcoming-changes.js' import processSchemas from './utils/process-schemas.js' import { prependDatedEntry, createChangelogEntry } from './build-changelog.js' -import loadData from '../../lib/site-data.js' const graphqlDataDir = path.join(process.cwd(), 'data/graphql') const graphqlStaticDir = path.join(process.cwd(), 'lib/graphql/static') @@ -25,22 +24,12 @@ if (!process.env.GITHUB_TOKEN) { const versionsToBuild = Object.keys(allVersions) -const currentLanguage = 'en' - main() async function main() { const previewsJson = {} const upcomingChangesJson = {} - const siteData = loadData() - - // create a bare minimum context for rendering the graphql-object.html layout - const context = { - currentLanguage, - site: siteData[currentLanguage].site, - } - for (const version of versionsToBuild) { // Get the relevant GraphQL name for the current version // For example, free-pro-team@latest corresponds to dotcom, @@ -73,10 +62,6 @@ async function main() { path.join(graphqlStaticDir, `schema-${graphqlVersion}.json`) ) - // Add some version specific data to the context - context.graphql = { schemaForCurrentVersion: schemaJsonPerVersion } - context.currentVersion = version - // 4. UPDATE CHANGELOG if (allVersions[version].nonEnterpriseDefault) { // The Changelog is only build for free-pro-team@latest