File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/gatsby/src/schema/graphql-engine Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import { GatsbyNodeAPI } from "../../redux/types"
33import * as nodeApis from "../../utils/api-node-docs"
44import { schemaCustomizationAPIs } from "./print-plugins"
55
6+ const apisToKeep = new Set ( schemaCustomizationAPIs )
7+ apisToKeep . add ( `onPluginInit` )
8+
69module . exports = function loader ( source : string ) : string | null | undefined {
710 const result = transformSync ( source , {
811 babelrc : false ,
@@ -12,7 +15,7 @@ module.exports = function loader(source: string): string | null | undefined {
1215 require . resolve ( `../../utils/babel/babel-plugin-remove-api` ) ,
1316 {
1417 apis : ( Object . keys ( nodeApis ) as Array < GatsbyNodeAPI > ) . filter (
15- api => ! schemaCustomizationAPIs . has ( api )
18+ api => ! apisToKeep . has ( api )
1619 ) ,
1720 } ,
1821 ] ,
You can’t perform that action at this time.
0 commit comments