Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/node-libraries/pothos-schema-exporter
Plugin to output 'schema.graphql' from pothos to file
https://github.com/node-libraries/pothos-schema-exporter
Last synced: 1 day ago
JSON representation
Plugin to output 'schema.graphql' from pothos to file
- Host: GitHub
- URL: https://github.com/node-libraries/pothos-schema-exporter
- Owner: node-libraries
- License: mit
- Created: 2023-08-31T07:48:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-27T00:14:51.000Z (over 1 year ago)
- Last Synced: 2024-12-23T19:48:09.499Z (about 1 month ago)
- Language: TypeScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pothos-schema-exporter
Plugin to output 'schema.graphql' from pothos to file
## usage
Set the output path to `output`
```ts
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
```ts
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"),
},
});
```