Closed Nnigmat closed 5 days ago
Thanks for your contribution! I will give it a closer look as soon as I am able to. ❤️
This is awesome. Really appreciate you taking the time to write a test for it as well. Thanks!
:tada: This PR is included in version 3.4.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Problem
I work on a project and we have many schema files, which we are collecting using glob, e.g.
src/server/**/*.graphql
.After saving those files the watch mode codegen process does not start.
Solution
To solve this problem we can use
loadSchema
function which works asloadDocuments
function. It takes array of paths and glob-patterns and returns array of normalized file paths.We use this paths to match changed files.
Notes
Function
loadSchema
have a bug with typings. In the type definition says that it accepts only one schema pointer. But function use another module which supports array of schema pointers too.I have created an issue to @graphql-codegen/cli - https://github.com/dotansimha/graphql-code-generator/issues/10196