You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{codegen}from'@graphql-codegen/core';import{join}from'path';import{buildSchema}from'graphql';import{readFileSync,writeFileSync}from'fs';import*astypescriptPluginfrom'@graphql-codegen/typescript';import{printSchema,parse}from'graphql';constschema=buildSchema(readFileSync('./schema.graphql','utf-8'));constoutputFile='output.ts';constconfig={// used by a plugin internally, although the 'typescript' plugin currently// returns the string output, rather than writing to a filefilename: outputFile,schema: parse(printSchema(schema)),plugins: [// Each plugin should be an object{typescript: {}// Here you can pass configuration to the plugin}],pluginMap: {typescript: typescriptPlugin}};(async()=>{constoutput=awaitcodegen(config);writeFileSync(join(__dirname,outputFile),output);})();
The text was updated successfully, but these errors were encountered:
in scripts
./codegen.js
:The text was updated successfully, but these errors were encountered: