Due to issues in graphql-tools import functionality (ardatan/graphql-tools#5436), I am writing a utility for loading a graphql file with support for #import
syntax that is easier to debug and more performant.
There are 4 classes exported:
CachedFileLoader
- load a file and cache its contents by absolute file nameCachedGraphqlParser
- parse a graphql string and cache its contents by absolute file nameDocumentDefinitionFilter
- filter a graphql document object's definitions by a list of types and their transitive dependenciesGraphQLFileLoader
- load a graphql file by filename and resolve all import statements