@graphql-tools/apollo-engine-loader 7.3.7-alpha-e7752ba5.0 → 7.3.7-alpha-b9e4a92b.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,13 +1,15 @@
1
1
  {
2
2
  "name": "@graphql-tools/apollo-engine-loader",
3
- "version": "7.3.7-alpha-e7752ba5.0",
3
+ "version": "7.3.7-alpha-b9e4a92b.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/utils": "8.9.1-alpha-e7752ba5.0",
10
+ "@ardatan/sync-fetch": "0.0.1",
11
+ "@graphql-tools/utils": "8.9.1-alpha-b9e4a92b.0",
8
12
  "@whatwg-node/fetch": "^0.2.4",
9
- "@graphql-tools/graphql": "0.1.0-alpha-e7752ba5.0",
10
- "sync-fetch": "0.4.1",
11
13
  "tslib": "^2.4.0"
12
14
  },
13
15
  "repository": {
@@ -27,7 +29,7 @@
27
29
  "exports": {
28
30
  ".": {
29
31
  "require": {
30
- "types": "./typings/index.d.ts",
32
+ "types": "./typings/index.d.cts",
31
33
  "default": "./cjs/index.js"
32
34
  },
33
35
  "import": {
@@ -41,7 +43,7 @@
41
43
  },
42
44
  "./*": {
43
45
  "require": {
44
- "types": "./typings/*.d.ts",
46
+ "types": "./typings/*.d.cts",
45
47
  "default": "./cjs/*.js"
46
48
  },
47
49
  "import": {
@@ -0,0 +1,27 @@
1
+ import { Source, BaseLoaderOptions, Loader } from '@graphql-tools/utils';
2
+ /**
3
+ * Additional options for loading from Apollo Engine
4
+ */
5
+ export interface ApolloEngineOptions extends BaseLoaderOptions {
6
+ engine: {
7
+ endpoint?: string;
8
+ apiKey: string;
9
+ };
10
+ graph: string;
11
+ variant: string;
12
+ headers?: Record<string, string>;
13
+ }
14
+ /**
15
+ * This loader loads a schema from Apollo Engine
16
+ */
17
+ export declare class ApolloEngineLoader implements Loader<ApolloEngineOptions> {
18
+ private getFetchArgs;
19
+ canLoad(ptr: string): Promise<boolean>;
20
+ canLoadSync(ptr: string): boolean;
21
+ load(pointer: string, options: ApolloEngineOptions): Promise<Source[]>;
22
+ loadSync(pointer: string, options: ApolloEngineOptions): Source[];
23
+ }
24
+ /**
25
+ * @internal
26
+ */
27
+ export declare const SCHEMA_QUERY = "\n query GetSchemaByTag($tag: String!, $id: ID!) {\n service(id: $id) {\n ... on Service {\n __typename\n schema(tag: $tag) {\n document\n }\n }\n }\n }\n";