Skip to content

Commit b07da30

Browse files
ref(ts): Marginally improve types in createSchemaCustomization (#7330)
1 parent 81dc803 commit b07da30

File tree

1 file changed

+8
-3
lines changed
  • src/gatsby/createSchemaCustomization

1 file changed

+8
-3
lines changed

src/gatsby/createSchemaCustomization/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
import {GatsbyNode} from 'gatsby';
2+
13
import {getApiTypeDefs} from './apiSchema';
24
import {getAppTypeDefs} from './appSchema';
35
import {getPackageTypeDefs} from './packageSchema';
46
import {getPlatformTypeDefs} from './platformSchema';
57

68
// TODO(dcramer): move frontmatter out of ApiEndpoint and into Frontmatter
7-
function main({actions, schema}) {
9+
const createSchemaCustomization: GatsbyNode['createSchemaCustomization'] = ({
10+
actions,
11+
schema,
12+
}) => {
813
const {createTypes} = actions;
914
const typeDefs = [
1015
`
@@ -124,6 +129,6 @@ function main({actions, schema}) {
124129
...getPackageTypeDefs(),
125130
...getAppTypeDefs(),
126131
]);
127-
}
132+
};
128133

129-
export default main;
134+
export default createSchemaCustomization;

0 commit comments

Comments
 (0)