@schema-hub/zod-graphql-fake-client 0.0.13 → 0.0.15

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,27 +1,29 @@
1
1
  {
2
2
  "author": "Mathias Schreck <schreck.mathias@gmail.com>",
3
- "dependencies": {
4
- "@schema-hub/zod-graphql-query-builder": "0.0.12"
5
- },
6
3
  "description": "Fake GraphQL client for testing @schema-hub/zod-graphql-client",
7
4
  "engines": {
8
- "node": "^22"
5
+ "node": "^24 || ^26"
6
+ },
7
+ "exports": {
8
+ ".": {
9
+ "import": "./zod-graphql-fake-client/fake-client.js",
10
+ "types": "./zod-graphql-fake-client/fake-client.d.ts"
11
+ }
9
12
  },
10
13
  "keywords": [
11
14
  "fake-graphql-client",
12
15
  "testing-client"
13
16
  ],
14
17
  "license": "MIT",
15
- "main": "zod-graphql-fake-client/fake-client.js",
16
18
  "name": "@schema-hub/zod-graphql-fake-client",
17
19
  "peerDependencies": {
18
- "@schema-hub/zod-graphql-client": "0.0.13"
20
+ "@schema-hub/zod-graphql-client": "0.0.15"
19
21
  },
20
22
  "repository": {
21
23
  "type": "git",
22
24
  "url": "git+ssh://git@github.com/enormora/schema-hub.git"
23
25
  },
26
+ "sideEffects": false,
24
27
  "type": "module",
25
- "types": "zod-graphql-fake-client/fake-client.d.ts",
26
- "version": "0.0.13"
28
+ "version": "0.0.15"
27
29
  }
package/readme.md CHANGED
@@ -47,20 +47,26 @@ const client = createFakeGraphqlClient({ results: customResults });
47
47
 
48
48
  The order of the array matters, so the first result will be returned by the first `query()` or `mutate()` call.
49
49
 
50
- ### Inspecting Operation Payloads
50
+ ### Inspecting Operations
51
51
 
52
- The fake GraphQL client keeps track of all operation payloads sent to the server (without actually sending them), allowing inspection during tests. Retrieve individual operation payloads by index or inspect the first operation payload recorded.
52
+ The fake GraphQL client keeps track of every operation sent to it (without actually making any network calls), allowing inspection during tests. Each recorded operation captures the schema, the resolved request payload, the parsed variable values, the operation name, and the per-call options.
53
53
 
54
54
  ```typescript
55
55
  import { createFakeGraphqlClient } from '@schema-hub/zod-graphql-fake-client';
56
56
 
57
57
  const client = createFakeGraphqlClient();
58
58
 
59
- // Inspect the payload of the first operation
59
+ // Inspect just the request payload of the first operation
60
60
  const firstPayload = client.inspectFirstOperationPayload();
61
61
  console.log(firstPayload);
62
62
 
63
- // Inspect the payload of the second operation
64
- const secondPayload = client.inspectOperationPayload(1);
65
- console.log(secondPayload);
63
+ // Inspect the full recorded operation (payload + values + options + schema)
64
+ const firstOperation = client.inspectFirstOperation();
65
+ console.log(firstOperation);
66
+
67
+ // Inspect by index
68
+ const secondOperation = client.inspectOperation(1);
69
+ console.log(secondOperation);
66
70
  ```
71
+
72
+ `findOperation`, `findAllOperations`, and `findOperationOrThrow` accept a matcher that can filter recorded operations by `operationName`, `type`, `schema`, or a custom predicate function.
package/sbom.cdx.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "metadata": {
7
+ "tools": {
8
+ "components": [
9
+ {
10
+ "type": "application",
11
+ "name": "packtory",
12
+ "version": "0.0.26"
13
+ }
14
+ ]
15
+ },
16
+ "component": {
17
+ "type": "library",
18
+ "name": "@schema-hub/zod-graphql-fake-client",
19
+ "version": "0.0.15",
20
+ "bom-ref": "pkg:npm/@schema-hub/zod-graphql-fake-client@0.0.15",
21
+ "purl": "pkg:npm/@schema-hub/zod-graphql-fake-client@0.0.15"
22
+ }
23
+ },
24
+ "components": [
25
+ {
26
+ "type": "library",
27
+ "name": "@schema-hub/zod-graphql-client",
28
+ "version": "0.0.15",
29
+ "bom-ref": "pkg:npm/@schema-hub/zod-graphql-client@0.0.15",
30
+ "scope": "optional",
31
+ "licenses": [
32
+ {
33
+ "expression": "MIT"
34
+ }
35
+ ],
36
+ "purl": "pkg:npm/@schema-hub/zod-graphql-client@0.0.15"
37
+ }
38
+ ],
39
+ "dependencies": [
40
+ {
41
+ "ref": "pkg:npm/@schema-hub/zod-graphql-client@0.0.15"
42
+ },
43
+ {
44
+ "ref": "pkg:npm/@schema-hub/zod-graphql-fake-client@0.0.15",
45
+ "dependsOn": [
46
+ "pkg:npm/@schema-hub/zod-graphql-client@0.0.15"
47
+ ]
48
+ }
49
+ ]
50
+ }
@@ -1,10 +1,27 @@
1
- import type { GraphqlOverHttpOperationRequestPayload, OperationOptions } from '@schema-hub/zod-graphql-client/zod-graphql-client/client.js';
2
- import { type GraphqlClient, type OperationErrorDetails } from '@schema-hub/zod-graphql-client/zod-graphql-client/entry-point.js';
1
+ import type { GraphqlClient, OperationErrorDetails, QuerySchema } from '@schema-hub/zod-graphql-client';
2
+ import { type GraphqlOverHttpOperationRequestPayload, type OperationOptions, type OperationType } from '@schema-hub/zod-graphql-client/zod-graphql-client/operation-payload.d.ts';
3
+ export type RecordedOperation = {
4
+ readonly type: OperationType;
5
+ readonly schema: QuerySchema;
6
+ readonly payload: GraphqlOverHttpOperationRequestPayload;
7
+ readonly operationName: string | undefined;
8
+ readonly values: Record<string, unknown>;
9
+ readonly options: OperationOptions;
10
+ };
11
+ export type OperationMatcherObject = {
12
+ readonly operationName?: string;
13
+ readonly type?: OperationType;
14
+ readonly schema?: QuerySchema;
15
+ };
16
+ export type OperationMatcher = OperationMatcherObject | ((recorded: RecordedOperation) => boolean);
3
17
  export type FakeGraphqlClient = GraphqlClient & {
4
18
  readonly inspectOperationPayload: (index: number) => GraphqlOverHttpOperationRequestPayload;
5
19
  readonly inspectFirstOperationPayload: () => GraphqlOverHttpOperationRequestPayload;
6
- readonly inspectOperationOptions: (index: number) => OperationOptions;
7
- readonly inspectFirstOperationOptions: () => OperationOptions;
20
+ readonly inspectOperation: (index: number) => RecordedOperation;
21
+ readonly inspectFirstOperation: () => RecordedOperation;
22
+ readonly findOperation: (matcher: OperationMatcher) => RecordedOperation | undefined;
23
+ readonly findOperationOrThrow: (matcher: OperationMatcher) => RecordedOperation;
24
+ readonly findAllOperations: (matcher: OperationMatcher) => readonly RecordedOperation[];
8
25
  };
9
26
  type FakeSuccessData = {
10
27
  error?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"fake-client.d.ts","sourceRoot":"","sources":["../../../../source/zod-graphql-fake-client/fake-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sCAAsC,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChH,OAAO,EACH,KAAK,aAAa,EAElB,KAAK,qBAAqB,EAG7B,MAAM,sCAAsC,CAAC;AAI9C,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC5C,QAAQ,CAAC,uBAAuB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,sCAAsC,CAAC;IAC5F,QAAQ,CAAC,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;IACpF,QAAQ,CAAC,uBAAuB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,gBAAgB,CAAC;IACtE,QAAQ,CAAC,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;CACjE,CAAC;AAEF,KAAK,eAAe,GAAG;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,qBAAqB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAE7D,KAAK,iBAAiB,GAAG;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACnC,CAAC;AACF,wBAAgB,uBAAuB,CAAC,aAAa,GAAE,iBAAsB,GAAG,iBAAiB,CAyGhG"}
1
+ {"version":3,"file":"fake-client.d.ts","sourceRoot":"","sources":["../../../../source/zod-graphql-fake-client/fake-client.ts"],"names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AAG,SAAS,CAAC;IACrF,QAAQ,CAAC,oBAAoB,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,iBAAiB,CAAC;IAChF,QAAQ,CAAC,iBAAiB,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,SAAS,iBAAiB,EAAE,CAAC;CAC3F,CAAC;AAEF,KAAK,eAAe,GAAG;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,qBAAqB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAE7D,KAAK,iBAAiB,GAAG;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACnC,CAAC;AAmMF,wBAAgB,uBAAuB,CAAC,aAAa,GAAE,iBAAsB,GAAG,iBAAiB,CAahG"}
@@ -1,81 +1,147 @@
1
- import { GraphqlOperationError } from '@schema-hub/zod-graphql-client/zod-graphql-client/entry-point.js';
2
- import { extractVariableDefinitions, extractVariableValues } from '@schema-hub/zod-graphql-client/zod-graphql-client/variables.js';
3
- import { buildGraphqlMutation, buildGraphqlQuery } from '@schema-hub/zod-graphql-query-builder/zod-graphql-query-builder/entry-point.js';
4
- export function createFakeGraphqlClient(clientOptions = {}) {
5
- const { results = [] } = clientOptions;
6
- const operationPayloads = [];
7
- const operationOptions = [];
8
- const defaultResult = { data: {} };
9
- async function collectOperation(schema, type, options = {}) {
10
- const { variables = {} } = options;
11
- const variableDefinitions = extractVariableDefinitions(variables);
12
- const variableValues = extractVariableValues(variables);
13
- const serializedQuery = type === 'query' ?
14
- buildGraphqlQuery(schema, {
15
- operationName: options.operationName,
16
- variableDefinitions
17
- }) :
18
- buildGraphqlMutation(schema, {
19
- operationName: options.operationName,
20
- variableDefinitions
21
- });
22
- const result = results[operationPayloads.length] ?? defaultResult;
23
- operationPayloads.push({
24
- operationName: options.operationName,
25
- query: serializedQuery,
26
- variables: variableValues
1
+ import { extractDataOrThrow } from '@schema-hub/zod-graphql-client/zod-graphql-client/client.js';
2
+ import { buildOperationPayload, resolveOperationInputs } from '@schema-hub/zod-graphql-client/zod-graphql-client/operation-payload.js';
3
+ function operationMatchesObject(matcher, recorded) {
4
+ const nameMatches = matcher.operationName === undefined ||
5
+ recorded.operationName === matcher.operationName;
6
+ const typeMatches = matcher.type === undefined || recorded.type === matcher.type;
7
+ const schemaMatches = matcher.schema === undefined || recorded.schema === matcher.schema;
8
+ return nameMatches && typeMatches && schemaMatches;
9
+ }
10
+ function operationMatches(matcher, recorded) {
11
+ if (typeof matcher === 'function') {
12
+ return matcher(recorded);
13
+ }
14
+ return operationMatchesObject(matcher, recorded);
15
+ }
16
+ function describeMatcherObject(matcher) {
17
+ const parts = [];
18
+ if (matcher.operationName !== undefined) {
19
+ parts.push(`operationName=${matcher.operationName}`);
20
+ }
21
+ if (matcher.type !== undefined) {
22
+ parts.push(`type=${matcher.type}`);
23
+ }
24
+ if (matcher.schema !== undefined) {
25
+ parts.push('schema=<schema>');
26
+ }
27
+ return parts.length === 0 ? '{}' : `{ ${parts.join(', ')} }`;
28
+ }
29
+ function describeMatcher(matcher) {
30
+ if (typeof matcher === 'function') {
31
+ return 'predicate function';
32
+ }
33
+ return describeMatcherObject(matcher);
34
+ }
35
+ function buildOperationFinders(recordedOperations) {
36
+ function findOperation(matcher) {
37
+ return recordedOperations.find((recorded) => {
38
+ return operationMatches(matcher, recorded);
27
39
  });
28
- operationOptions.push(options);
29
- if (result.error !== undefined) {
30
- return { success: false, errorDetails: result.error };
40
+ }
41
+ function findAllOperations(matcher) {
42
+ return recordedOperations.filter((recorded) => {
43
+ return operationMatches(matcher, recorded);
44
+ });
45
+ }
46
+ function findOperationOrThrow(matcher) {
47
+ const recorded = findOperation(matcher);
48
+ if (recorded === undefined) {
49
+ throw new Error(`No operation recorded matching ${describeMatcher(matcher)}`);
31
50
  }
32
- return { success: true, data: result.data };
51
+ return recorded;
52
+ }
53
+ return { findOperation, findAllOperations, findOperationOrThrow };
54
+ }
55
+ const defaultResult = { data: {} };
56
+ function recordAndRespond(state, invocation) {
57
+ const resolution = resolveOperationInputs(invocation.target, invocation.valuesOrOptions, invocation.maybeOptions);
58
+ if (!resolution.success) {
59
+ return resolution;
60
+ }
61
+ const inputs = resolution.data;
62
+ const payload = buildOperationPayload({
63
+ schema: inputs.schema,
64
+ operationType: invocation.type,
65
+ operationName: inputs.operationName,
66
+ variableDefinitions: inputs.variableDefinitions,
67
+ variableValues: inputs.variableValues
68
+ });
69
+ const result = state.results[state.recordedOperations.length] ?? defaultResult;
70
+ state.recordedOperations.push({
71
+ type: invocation.type,
72
+ schema: inputs.schema,
73
+ payload,
74
+ operationName: inputs.operationName,
75
+ values: inputs.variableValues,
76
+ options: inputs.options
77
+ });
78
+ if (result.error !== undefined) {
79
+ return { success: false, errorDetails: result.error };
80
+ }
81
+ return { success: true, data: result.data };
82
+ }
83
+ function buildClientMethods(state) {
84
+ async function query(handle, ...rest) {
85
+ return recordAndRespond(state, {
86
+ type: 'query',
87
+ target: handle,
88
+ valuesOrOptions: rest[0],
89
+ maybeOptions: rest[1]
90
+ });
91
+ }
92
+ async function mutate(handle, ...rest) {
93
+ return recordAndRespond(state, {
94
+ type: 'mutation',
95
+ target: handle,
96
+ valuesOrOptions: rest[0],
97
+ maybeOptions: rest[1]
98
+ });
33
99
  }
34
- async function query(schema, options = {}) {
35
- return collectOperation(schema, 'query', options);
100
+ async function queryOrThrow(handle, ...rest) {
101
+ return extractDataOrThrow(await query(handle, ...rest));
36
102
  }
37
- async function mutate(schema, options = {}) {
38
- return collectOperation(schema, 'mutation', options);
103
+ async function mutateOrThrow(handle, ...rest) {
104
+ return extractDataOrThrow(await mutate(handle, ...rest));
39
105
  }
106
+ return { query, queryOrThrow, mutate, mutateOrThrow };
107
+ }
108
+ function buildInspectors(recordedOperations) {
40
109
  function inspectOperationPayload(index) {
41
- const payload = operationPayloads[index];
42
- if (payload === undefined) {
110
+ const recorded = recordedOperations[index];
111
+ if (recorded === undefined) {
43
112
  throw new Error(`No query payload at index ${index} recorded`);
44
113
  }
45
- return payload;
114
+ return recorded.payload;
46
115
  }
47
- function inspectOperationOptions(index) {
48
- const operationOption = operationOptions[index];
49
- if (operationOption === undefined) {
50
- throw new Error(`No operationOption at index ${index} recorded`);
116
+ function inspectOperation(index) {
117
+ const recorded = recordedOperations[index];
118
+ if (recorded === undefined) {
119
+ throw new Error(`No operation at index ${index} recorded`);
51
120
  }
52
- return operationOption;
121
+ return recorded;
53
122
  }
54
123
  return {
55
- query,
56
- async queryOrThrow(schema, options) {
57
- const result = await query(schema, options);
58
- if (result.success) {
59
- return result.data;
60
- }
61
- throw new GraphqlOperationError(result.errorDetails);
62
- },
63
- mutate,
64
- async mutateOrThrow(schema, options) {
65
- const result = await mutate(schema, options);
66
- if (result.success) {
67
- return result.data;
68
- }
69
- throw new GraphqlOperationError(result.errorDetails);
70
- },
71
124
  inspectOperationPayload,
72
- inspectFirstOperationPayload() {
125
+ inspectFirstOperationPayload: () => {
73
126
  return inspectOperationPayload(0);
74
127
  },
75
- inspectOperationOptions,
76
- inspectFirstOperationOptions() {
77
- return inspectOperationOptions(0);
128
+ inspectOperation,
129
+ inspectFirstOperation: () => {
130
+ return inspectOperation(0);
78
131
  }
79
132
  };
80
133
  }
134
+ export function createFakeGraphqlClient(clientOptions = {}) {
135
+ const { results = [] } = clientOptions;
136
+ const recordedOperations = [];
137
+ const state = { results, recordedOperations };
138
+ const clientMethods = buildClientMethods(state);
139
+ const inspectors = buildInspectors(recordedOperations);
140
+ const finders = buildOperationFinders(recordedOperations);
141
+ return {
142
+ ...clientMethods,
143
+ ...inspectors,
144
+ ...finders
145
+ };
146
+ }
81
147
  //# sourceMappingURL=fake-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fake-client.js","sourceRoot":"","sources":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