How to use the @fullstack-one/helper.helper.loadFilesByGlobPattern function in @fullstack-one/helper

To help you get started, we’ve selected a few @fullstack-one/helper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fullstack-build / fullstack-one / packages / schema-builder / lib / db-schema-builder / graphql / index.ts View on Github external
private async boot(): Promise {

    try {

      // load schema
      const gQlSdlPattern = this.ENVIRONMENT.path + this.graphQlConfig.schemaPattern;
      this.gQlSdl = await helper.loadFilesByGlobPattern(gQlSdlPattern);

      // check if any files were loaded
      if (this.gQlSdl.length === 0) {
        this.logger.warn('boot.no.sdl.files.found');
        return;
      }

      // Combine all Schemas to a big one and add extensions from other modules
      const gQlSdlCombined = this.gQlSdl.concat(this.gQlSdlExtensions.slice()).join('\n');
      this.gQlAst = gQLHelper.helper.parseGraphQlSchema(gQlSdlCombined);

      this.dbMeta = parseGQlAstToDbMeta(this.gQlAst);

      // load permissions and expressions and generate views and put them into schemas
      try {