@coderich/autograph 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderich/autograph",
3
3
  "author": "Richard Livolsi (coderich)",
4
- "version": "0.9.3",
4
+ "version": "0.9.4",
5
5
  "description": "AutoGraph",
6
6
  "keywords": [
7
7
  "graphql",
@@ -50,8 +50,8 @@ module.exports = class extends Schema {
50
50
  this.modelsByKey = this.models.reduce((prev, model) => Object.assign(prev, { [model.getKey()]: model }), {});
51
51
  }
52
52
 
53
- loadDir(dir) {
54
- super.loadDir(dir);
53
+ loadDir(dir, options) {
54
+ super.loadDir(dir, options);
55
55
  this.createModels();
56
56
  return this;
57
57
  }
@@ -106,12 +106,12 @@ module.exports = class Schema extends Node {
106
106
  return this.schema.context;
107
107
  }
108
108
 
109
- loadDir(dir) {
109
+ loadDir(dir, options) {
110
110
  // Typedefs
111
- const typeDefs = Glob.sync(`${dir}/**/*.{gql,graphql}`).map(file => loadFile(file)).join('\n\n');
111
+ const typeDefs = Glob.sync(`${dir}/**/*.{gql,graphql}`, options).map(file => loadFile(file)).join('\n\n');
112
112
 
113
113
  // Possibly full schema definitions
114
- const schema = Glob.sync(`${dir}/**/*.js`).map(file => reqFile(file)).reduce((prev, data) => {
114
+ const schema = Glob.sync(`${dir}/**/*.js`, options).map(file => reqFile(file)).reduce((prev, data) => {
115
115
  return Merge(prev, data);
116
116
  }, {
117
117
  typeDefs: typeDefs.length ? typeDefs : undefined,