Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade graphql package #367

Merged
merged 5 commits into from
May 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use the new getIntrospectionQuery()
Instead of graphql.introspectionQuery we now need to use
getIntrospectionQuery()
  • Loading branch information
beepsoft committed May 6, 2022
commit 88c61264a3a12a91b128ce369dbda3ee8e927840
3 changes: 2 additions & 1 deletion generator/mst-gql-scaffold.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const path = require("path")
const fs = require("fs")
const child_process = require("child_process")
const graphql = require("graphql")
const { getIntrospectionQuery } = require("graphql")

const { getConfig, mergeConfigs } = require("./config")
const { generate, writeFiles, logUnexpectedFiles } = require("./generate")
Expand Down Expand Up @@ -85,7 +86,7 @@ function main() {
// Tnx https://blog.apollographql.com/three-ways-to-represent-your-graphql-schema-a41f4175100d!
const text = fs.readFileSync(input, "utf8")
const schema = graphql.buildSchema(text)
const res = graphql.graphqlSync(schema, graphql.introspectionQuery)
const res = graphql.graphqlSync({schema, source: getIntrospectionQuery()})
if (res.data) json = res.data
else {
console.error("graphql parse error:\n\n" + JSON.stringify(res, null, 2))
Expand Down