@luvio/graphql-parser 0.103.0 → 0.105.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/dist/gql.d.ts +8 -6
- package/dist/luvioGraphqlParser.js +1176 -1183
- package/dist/luvioGraphqlParser.mjs +1177 -1182
- package/dist/main.d.ts +6 -3
- package/package.json +1 -1
- package/src/__tests__/gql.spec.ts +1 -20
- package/src/__tests__/main.spec.ts +51 -0
- package/src/gql.ts +9 -24
- package/src/main.ts +21 -15
package/dist/gql.d.ts
CHANGED
|
@@ -15,7 +15,14 @@ export declare const docMap: Map<string, DocumentNode>;
|
|
|
15
15
|
* As a user shouldn't have access to the Document
|
|
16
16
|
*/
|
|
17
17
|
export declare const referenceMap: WeakMap<Object, DocumentNode>;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Returns document node if cached or else update the cache and return the document node
|
|
20
|
+
* @param inputString - operation string
|
|
21
|
+
* @returns DocumentNode
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseDocument(inputString: string): DocumentNode | null;
|
|
24
|
+
export declare function updateReferenceMapWithKnownKey(doc: DocumentNode, key: object): void;
|
|
25
|
+
export declare function updateReferenceMapAndGetKey(doc: DocumentNode): object;
|
|
19
26
|
/**
|
|
20
27
|
* Insert string and fragment substitutions with the actual nodes
|
|
21
28
|
* @param inputString
|
|
@@ -42,8 +49,3 @@ export declare const astResolver: AstResolver;
|
|
|
42
49
|
* @returns an opaque reference to the parsed document
|
|
43
50
|
*/
|
|
44
51
|
export declare function gql(literals: ReadonlyArray<string> | string, ...subs: (string | object)[]): object | null;
|
|
45
|
-
/**
|
|
46
|
-
* Enable the parser to add corresponding metaschema directives for backwards compatibility
|
|
47
|
-
*/
|
|
48
|
-
export declare function enableAddMetaschemaDirective(): void;
|
|
49
|
-
export declare function disableAddMetaschemaDirective(): void;
|