@luvio/graphql 0.143.4 → 0.143.5

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.
@@ -8,6 +8,17 @@ function createFragmentMap(documentNode) {
8
8
  return fragments;
9
9
  }
10
10
 
11
+ function buildFieldState(state, fullPath, data) {
12
+ return {
13
+ ...state,
14
+ path: {
15
+ parent: null,
16
+ propertyName: null,
17
+ fullPath,
18
+ },
19
+ data,
20
+ };
21
+ }
11
22
  function serializeFieldArguments(argumentNodes, variables) {
12
23
  const mutableArgumentNodes = Object.assign([], argumentNodes);
13
24
  return `args__(${mutableArgumentNodes
@@ -128,4 +139,4 @@ function getOperationFromDocument(document, operationName) {
128
139
  return operations[0]; // If a named operation is not provided, we return the first one
129
140
  }
130
141
 
131
- export { buildQueryTypeStringKey, buildQueryTypeStructuredKey, createFragmentMap, getOperationFromDocument, serializeFieldArguments, serializeOperationNode };
142
+ export { buildFieldState, buildQueryTypeStringKey, buildQueryTypeStructuredKey, createFragmentMap, getOperationFromDocument, serializeFieldArguments, serializeOperationNode };
@@ -1,3 +1,12 @@
1
+ import type { NormalizedKeyMetadata } from '@luvio/engine';
1
2
  import type { ArgumentNode } from '@luvio/graphql-parser';
2
3
  import type { GraphQLVariables } from './main';
4
+ export declare function buildFieldState<T = Record<string, any>>(state: T, fullPath: string | NormalizedKeyMetadata, data: any): T & {
5
+ data: any;
6
+ path: {
7
+ parent: null;
8
+ propertyName: null;
9
+ fullPath: string | NormalizedKeyMetadata;
10
+ };
11
+ };
3
12
  export declare function serializeFieldArguments(argumentNodes: Readonly<ArgumentNode[]>, variables: GraphQLVariables): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luvio/graphql",
3
- "version": "0.143.4",
3
+ "version": "0.143.5",
4
4
  "description": "GraphQL utilities for Luvio GraphQL adapter support",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,8 +27,8 @@
27
27
  "test:size": "luvioBundlesize"
28
28
  },
29
29
  "dependencies": {
30
- "@luvio/engine": "^0.143.4",
31
- "@luvio/graphql-parser": "^0.143.4"
30
+ "@luvio/engine": "^0.143.5",
31
+ "@luvio/graphql-parser": "^0.143.5"
32
32
  },
33
33
  "volta": {
34
34
  "extends": "../../../package.json"