File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11import { transformSchemaAST } from "@graphql-codegen/schema-ast" ;
22import { YupSchemaVisitor } from "./yup/index" ;
33import { ValidationSchemaPluginConfig } from "./config" ;
4- import { oldVisit , PluginFunction , Types } from "@graphql-codegen/plugin-helpers" ;
4+ import {
5+ oldVisit ,
6+ PluginFunction ,
7+ Types ,
8+ } from "@graphql-codegen/plugin-helpers" ;
59import { GraphQLSchema } from "graphql" ;
610
7- export const plugin : PluginFunction < ValidationSchemaPluginConfig > = async (
11+ export const plugin : PluginFunction < ValidationSchemaPluginConfig > = (
812 schema : GraphQLSchema ,
913 _documents : Types . DocumentFile [ ] ,
1014 config : ValidationSchemaPluginConfig
11- ) : Promise < Types . PluginOutput > => {
15+ ) : Types . PluginOutput => {
1216 const { schema : _schema , ast } = transformSchemaAST ( schema , config ) ;
1317 const { buildImports, ...visitor } = YupSchemaVisitor ( _schema , config ) ;
1418
1519 const result = oldVisit ( ast , {
16- leave : visitor
20+ leave : visitor ,
1721 } ) ;
1822
1923 // @ts -ignore
@@ -24,5 +28,3 @@ export const plugin: PluginFunction<ValidationSchemaPluginConfig> = async (
2428 content : "\n" + [ ...generated ] . join ( "\n" ) ,
2529 } ;
2630} ;
27-
28- export default plugin ;
You can’t perform that action at this time.
0 commit comments