@graphql-tools/graphql-file-loader 7.5.1-alpha-e7752ba5.0 → 7.5.1-alpha-420b7771.0

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,12 +1,14 @@
1
1
  {
2
2
  "name": "@graphql-tools/graphql-file-loader",
3
- "version": "7.5.1-alpha-e7752ba5.0",
3
+ "version": "7.5.1-alpha-420b7771.0",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
+ "peerDependencies": {
7
+ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
+ },
6
9
  "dependencies": {
7
- "@graphql-tools/import": "6.7.2-alpha-e7752ba5.0",
8
- "@graphql-tools/utils": "8.9.1-alpha-e7752ba5.0",
9
- "@graphql-tools/graphql": "0.1.0-alpha-e7752ba5.0",
10
+ "@graphql-tools/import": "6.7.2-alpha-420b7771.0",
11
+ "@graphql-tools/utils": "8.9.1-alpha-420b7771.0",
10
12
  "globby": "^11.0.3",
11
13
  "unixify": "^1.0.0",
12
14
  "tslib": "^2.4.0"
@@ -28,7 +30,7 @@
28
30
  "exports": {
29
31
  ".": {
30
32
  "require": {
31
- "types": "./typings/index.d.ts",
33
+ "types": "./typings/index.d.cts",
32
34
  "default": "./cjs/index.js"
33
35
  },
34
36
  "import": {
@@ -42,7 +44,7 @@
42
44
  },
43
45
  "./*": {
44
46
  "require": {
45
- "types": "./typings/*.d.ts",
47
+ "types": "./typings/*.d.cts",
46
48
  "default": "./cjs/*.js"
47
49
  },
48
50
  "import": {
@@ -0,0 +1,46 @@
1
+ import { Source, Loader, BaseLoaderOptions } from '@graphql-tools/utils';
2
+ /**
3
+ * Additional options for loading from a GraphQL file
4
+ */
5
+ export interface GraphQLFileLoaderOptions extends BaseLoaderOptions {
6
+ /**
7
+ * Set to `true` to disable handling `#import` syntax
8
+ */
9
+ skipGraphQLImport?: boolean;
10
+ }
11
+ /**
12
+ * This loader loads documents and type definitions from `.graphql` files.
13
+ *
14
+ * You can load a single source:
15
+ *
16
+ * ```js
17
+ * const schema = await loadSchema('schema.graphql', {
18
+ * loaders: [
19
+ * new GraphQLFileLoader()
20
+ * ]
21
+ * });
22
+ * ```
23
+ *
24
+ * Or provide a glob pattern to load multiple sources:
25
+ *
26
+ * ```js
27
+ * const schema = await loadSchema('graphql/*.graphql', {
28
+ * loaders: [
29
+ * new GraphQLFileLoader()
30
+ * ]
31
+ * });
32
+ * ```
33
+ */
34
+ export declare class GraphQLFileLoader implements Loader<GraphQLFileLoaderOptions> {
35
+ canLoad(pointer: string, options: GraphQLFileLoaderOptions): Promise<boolean>;
36
+ canLoadSync(pointer: string, options: GraphQLFileLoaderOptions): boolean;
37
+ private _buildGlobs;
38
+ resolveGlobs(glob: string, options: GraphQLFileLoaderOptions): Promise<string[]>;
39
+ resolveGlobsSync(glob: string, options: GraphQLFileLoaderOptions): string[];
40
+ load(pointer: string, options: GraphQLFileLoaderOptions): Promise<Source[]>;
41
+ loadSync(pointer: string, options: GraphQLFileLoaderOptions): Source[];
42
+ handleFileContent(rawSDL: string, pointer: string, options: GraphQLFileLoaderOptions): {
43
+ location: string | undefined;
44
+ document: import("graphql").DocumentNode;
45
+ };
46
+ }
@@ -41,6 +41,6 @@ export declare class GraphQLFileLoader implements Loader<GraphQLFileLoaderOption
41
41
  loadSync(pointer: string, options: GraphQLFileLoaderOptions): Source[];
42
42
  handleFileContent(rawSDL: string, pointer: string, options: GraphQLFileLoaderOptions): {
43
43
  location: string | undefined;
44
- document: import("../../../graphql/src").DocumentNode;
44
+ document: import("graphql").DocumentNode;
45
45
  };
46
46
  }