Skip to content

node-libraries/pothos-schema-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pothos-schema-exporter

Plugin to output 'schema.graphql' from pothos to file

usage

Set the output path to output

import PothosSchemaExporter from "pothos-schema-exporter";

export const builder = new SchemaBuilder({
  plugins: [PothosSchemaExporter],
  pothosSchemaExporter: {
    output: "schema.graphql",
  },
});

If undefined,null,false is set, no file will be output

import PothosSchemaExporter from "pothos-schema-exporter";

export const builder = new SchemaBuilder({
  plugins: [PothosSchemaExporter],
  pothosSchemaExporter: {
    output:
      process.env.NODE_ENV === "development" &&
      path.join(process.cwd(), "graphql", "schema.graphql"),
  },
});

About

Plugin to output 'schema.graphql' from pothos to file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published