pothos-schema-exporter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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"),
  },
});

Package Sidebar

Install

npm i pothos-schema-exporter

Weekly Downloads

18

Version

1.0.0

License

MIT

Unpacked Size

7.8 kB

Total Files

12

Last publish

Collaborators

  • sora_kumo