In the past we used to have a file updateSchema.js
```
#!/usr/bin/env babel-node
import fs from 'fs';
import path from 'path';
import { schema } from '../data/schema';
import { graphql } from 'graphql';
import { introspectionQuery, printSchema } from 'graphql/utilities';
// Save JSON of full schema introspection for Babel Relay Plugin to use
(async () => {
const result = await (graphql(schema, introspectionQuery));
if (result.errors) {
console.error(
'ERROR introspecting schema: ',
JSON.stringify(result.errors, null, 2)
);
} else {
fs.writeFileSync(
path.join(__dirname, '../data/schema.json'),
JSON.stringify(result, null, 2)
);
}
})();
// Save user readable type system shorthand of schema
fs.writeFileSync(
path.join(__dirname, '../data/schema.graphql'),
printSchema(schema)
);
```
That generated the schema.json and schema.graphql files, now in the v14 of graphql-js theres a deprecation notice that instead of using introspectionQuery we should use getIntrospectionQueryv14 changelog.
Now updateSchema.js looks like this relay-examples:
```
import fs from 'fs';
import path from 'path';
import {schema} from '../data/schema';
import {printSchema} from 'graphql';
const schemaPath = path.resolve(__dirname, '../data/schema.graphql');
fs.writeFileSync(schemaPath, printSchema(schema));
console.log('Wrote ' + schemaPath);
```
How are we suppose to generate the schema.json file now?