Hi, thank you for the great library. It helps my life a lot.
Do you have a plan to dump IDL schema?
I'm using gqtx along with the awesome graphql-code-generator. To generate GraphQL query, I need schema.graphql file (Network request also works but I prefer to omit dependent services for code generation). Also, a static schema file will help other developers to understand overall API.
I've written the below script to dump schema in my current project. It would be great if dumping a schema is officially supported:
import { buildGraphQLSchema } from 'gqtx'
import { printSchemaWithDirectives } from '@graphql-tools/utils'
import { writeFileSync } from 'node:fs'
import { QueryType } from './types/Query'
export const schema = buildGraphQLSchema({
query: QueryType,
})
writeFileSync(
'./path/to/schema.graphql',
printSchemaWithDirectives(schema),
'utf8',
)
Hi, thank you for the great library. It helps my life a lot.
Do you have a plan to dump IDL schema?
I'm using
gqtx
along with the awesomegraphql-code-generator
. To generate GraphQL query, I needschema.graphql
file (Network request also works but I prefer to omit dependent services for code generation). Also, a static schema file will help other developers to understand overall API.I've written the below script to dump schema in my current project. It would be great if dumping a schema is officially supported:
If it's okay I'll try to send a PR. Thanks!