GraphQLSP
GraphQLSP copied to clipboard
Create directories recursively if they don't exist
Hey!
I'm generating the introspection types in a directory that is git-ignored, and graphqlsp does not create this directory automatically if not found
What do you think about adding something roughly like this?
if (output.endsWith('.ts')) {
await mkdir(path.dirname(output), { recursive: true });
}
(with proper error handling of course)
Ref: https://github.com/0no-co/GraphQLSP/blob/acede9b019204fcd2dcb4e6ff1ba4b642eda80b7/packages/graphqlsp/src/graphql/getSchema.ts#L78-L87
I'd be happy to contribute a pull request if this change is accepted