Skip to content

Commit

Permalink
Change deprecated introspectionQuery constant to `getIntrospectionQ…
Browse files Browse the repository at this point in the history
…uery()`.

`introspectionQuery` is deprecated in `graphql@15`.  The
`getIntrospectionQuery` utility has been around since before `0.13`, which
is still within our supported peer dependency ranges.

Ref: graphql/graphql-js#2125
  • Loading branch information
abernix committed Jan 3, 2020
1 parent 6b52263 commit ca1b3b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from "path";
import fs from "fs";
import { test as setup } from "apollo-cli-test";
import {
introspectionQuery,
getIntrospectionQuery,
print,
execute,
buildSchema,
Expand Down Expand Up @@ -46,7 +46,8 @@ const {

// introspection results of a schema, JSON.stringified
const fullSchemaJsonString = JSON.stringify(
execute(buildSchema(graphQLSchema), gql(introspectionQuery)).data.__schema
execute(buildSchema(graphQLSchema), gql(getIntrospectionQuery())).data
.__schema
);

// to be used for sample js files that contain client side schema definitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function uncaptureApplicationOutput(): string | null {
function sdlToIntrospectionQueryResult(schemaSdl: string) {
return graphql.graphqlSync(
graphql.buildSchema(schemaSdl),
graphql.introspectionQuery
graphql.getIntrospectionQuery()
).data;
}

Expand Down

0 comments on commit ca1b3b7

Please sign in to comment.