Skip to content

Commit 95b0161

Browse files
committed
fix: use getIntrospectionQuery with graphql@15
1 parent 5b8e47f commit 95b0161

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/generate-schema.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = async (options) => {
22
const path = require('path')
33
const fs = require('fs-extra')
44
const { logWithSpinner, stopSpinner, done } = require('@vue/cli-shared-utils')
5-
const { graphql, introspectionQuery, printSchema } = require('graphql')
5+
const { graphql, getIntrospectionQuery, printSchema } = require('graphql')
66
const { makeExecutableSchema } = require('graphql-tools')
77
const { load } = require('./load')
88

@@ -22,7 +22,7 @@ module.exports = async (options) => {
2222
// JSON schema
2323
logWithSpinner('📄', 'Generating JSON file...')
2424
await fs.ensureDir(path.dirname(options.jsonOutput))
25-
const result = await graphql(schema, introspectionQuery)
25+
const result = await graphql(schema, getIntrospectionQuery())
2626
if (result.errors) {
2727
throw new Error(`Generating JSON failed: ${result.errors.map(e => e.message).join(' | ')}`)
2828
}

0 commit comments

Comments
 (0)