graphql 14.6.0 → 14.7.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.
@@ -3,7 +3,7 @@ import { PromiseOrValue } from '../jsutils/PromiseOrValue';
3
3
  import { Path, addPath, pathToArray } from '../jsutils/Path';
4
4
 
5
5
  import { GraphQLError } from '../error/GraphQLError';
6
- import { locatedError } from '../error/locatedError';
6
+ import { GraphQLFormattedError } from '../error/formatError';
7
7
 
8
8
  import {
9
9
  DirectiveNode,
@@ -56,6 +56,12 @@ export interface ExecutionResult<TData = ExecutionResultDataDefault> {
56
56
  data?: TData | null;
57
57
  }
58
58
 
59
+ export interface FormattedExecutionResult<TData = ExecutionResultDataDefault> {
60
+ errors?: ReadonlyArray<GraphQLFormattedError>;
61
+ // TS_SPECIFIC: TData. Motivation: https://github.com/graphql/graphql-js/pull/2490#issuecomment-639154229
62
+ data?: TData | null;
63
+ }
64
+
59
65
  export type ExecutionArgs = {
60
66
  schema: GraphQLSchema;
61
67
  document: DocumentNode;
@@ -16,6 +16,7 @@ import promiseForObject from '../jsutils/promiseForObject';
16
16
  import { type PromiseOrValue } from '../jsutils/PromiseOrValue';
17
17
  import { type Path, addPath, pathToArray } from '../jsutils/Path';
18
18
 
19
+ import { type GraphQLFormattedError } from '../error/formatError';
19
20
  import { GraphQLError } from '../error/GraphQLError';
20
21
  import { locatedError } from '../error/locatedError';
21
22
 
@@ -117,6 +118,12 @@ export type ExecutionResult = {
117
118
  ...
118
119
  };
119
120
 
121
+ export type FormattedExecutionResult = {|
122
+ errors?: $ReadOnlyArray<GraphQLFormattedError>,
123
+ data?: ObjMap<mixed> | null,
124
+ extensions?: ObjMap<mixed>,
125
+ |};
126
+
120
127
  export type ExecutionArgs = {|
121
128
  schema: GraphQLSchema,
122
129
  document: DocumentNode,
@@ -6,6 +6,7 @@ export {
6
6
  defaultTypeResolver,
7
7
  ExecutionArgs,
8
8
  ExecutionResult,
9
+ FormattedExecutionResult,
9
10
  } from './execute';
10
11
 
11
12
  export { getDirectiveValues } from './values';
@@ -3,6 +3,10 @@
3
3
  export { pathToArray as responsePathAsArray } from '../jsutils/Path';
4
4
 
5
5
  export { execute, defaultFieldResolver, defaultTypeResolver } from './execute';
6
- export type { ExecutionArgs, ExecutionResult } from './execute';
6
+ export type {
7
+ ExecutionArgs,
8
+ ExecutionResult,
9
+ FormattedExecutionResult,
10
+ } from './execute';
7
11
 
8
12
  export { getDirectiveValues } from './values';
package/index.d.ts CHANGED
@@ -287,6 +287,7 @@ export {
287
287
  getDirectiveValues,
288
288
  ExecutionArgs,
289
289
  ExecutionResult,
290
+ FormattedExecutionResult,
290
291
  } from './execution';
291
292
 
292
293
  export {
package/index.js.flow CHANGED
@@ -288,7 +288,11 @@ export {
288
288
  getDirectiveValues,
289
289
  } from './execution';
290
290
 
291
- export type { ExecutionArgs, ExecutionResult } from './execution';
291
+ export type {
292
+ ExecutionArgs,
293
+ ExecutionResult,
294
+ FormattedExecutionResult,
295
+ } from './execution';
292
296
 
293
297
  export { subscribe, createSourceEventStream } from './subscription';
294
298
  export type { SubscriptionArgs } from './subscription';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql",
3
- "version": "14.6.0",
3
+ "version": "14.7.0",
4
4
  "description": "A Query Language and Runtime which can target any service.",
5
5
  "license": "MIT",
6
6
  "main": "index",
@@ -25,4 +25,4 @@
25
25
  "dependencies": {
26
26
  "iterall": "^1.2.2"
27
27
  }
28
- }
28
+ }
package/version.js CHANGED
@@ -13,7 +13,7 @@ exports.versionInfo = exports.version = void 0;
13
13
  /**
14
14
  * A string containing the version of the GraphQL.js library
15
15
  */
16
- var version = '14.6.0';
16
+ var version = '14.7.0';
17
17
  /**
18
18
  * An object containing the components of the GraphQL.js version string
19
19
  */
@@ -21,7 +21,7 @@ var version = '14.6.0';
21
21
  exports.version = version;
22
22
  var versionInfo = Object.freeze({
23
23
  major: 14,
24
- minor: 6,
24
+ minor: 7,
25
25
  patch: 0,
26
26
  preReleaseTag: null
27
27
  });
package/version.js.flow CHANGED
@@ -8,14 +8,14 @@
8
8
  /**
9
9
  * A string containing the version of the GraphQL.js library
10
10
  */
11
- export const version = '14.6.0';
11
+ export const version = '14.7.0';
12
12
 
13
13
  /**
14
14
  * An object containing the components of the GraphQL.js version string
15
15
  */
16
16
  export const versionInfo = Object.freeze({
17
17
  major: 14,
18
- minor: 6,
18
+ minor: 7,
19
19
  patch: 0,
20
20
  preReleaseTag: null,
21
21
  });
package/version.mjs CHANGED
@@ -6,14 +6,14 @@
6
6
  /**
7
7
  * A string containing the version of the GraphQL.js library
8
8
  */
9
- export var version = '14.6.0';
9
+ export var version = '14.7.0';
10
10
  /**
11
11
  * An object containing the components of the GraphQL.js version string
12
12
  */
13
13
 
14
14
  export var versionInfo = Object.freeze({
15
15
  major: 14,
16
- minor: 6,
16
+ minor: 7,
17
17
  patch: 0,
18
18
  preReleaseTag: null
19
19
  });