Skip to content

Commit f3b41ae

Browse files
committed
JSDoc tweaks.
1 parent 2315e73 commit f3b41ae

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- Reduced the number of promises created by the `GraphQL` instance method `operate` when the `reloadOnLoad` and `reloadOnLoad` options are `false`.
2323
- Added a code example for how to await all loading GraphQL operations.
2424
- Used consistent JSDoc types for promises that resolve `void`.
25+
- Tweaked JSDoc.
2526
- Tweaked changelog entries.
2627

2728
## 11.2.0

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Adds an event listener.
241241
242242
#### GraphQL instance method operate
243243
244-
Loads a GraphQL operation, visible in [GraphQL operations](#graphql-instance-property-operations). Emits a [`GraphQL`](#class-graphql) instance `fetch` event if an already loading operation isn’t reused, and a `cache` event once it’s loaded into the [GraphQL cache](#graphql-instance-property-cache).
244+
Loads a GraphQL operation, visible in [GraphQL operations](#graphql-instance-property-operations). Emits a [`GraphQL`](#class-graphql) [`fetch`](#graphql-event-fetch) event once the [`fetch`](https://developer.mozilla.org/docs/Web/API/Fetch_API) request has been initiated and the map of loading [GraphQL operations](#graphql-instance-property-operations) has been updated, and a [`GraphQL`](#class-graphql) [`cache`](#graphql-event-cache) event once it’s loaded into the [GraphQL cache](#graphql-instance-property-cache).
245245
246246
| Parameter | Type | Description |
247247
| :-- | :-- | :-- |
@@ -335,7 +335,7 @@ A map of loading [GraphQL operations](#type-graphqloperation), listed under thei
335335
336336
##### Examples
337337
338-
_How to await all loading [GraphQL operations](#graphql-instance-property-operations) ._
338+
_How to await all loading [GraphQL operations](#graphql-instance-property-operations)._
339339
340340
> ```js
341341
> await Promise.all(Object.values(graphql.operations).flat());

src/universal/GraphQL.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ module.exports = class GraphQL {
104104
* @kind member
105105
* @name GraphQL#operations
106106
* @type {object.<GraphQLCacheKey, Array<Promise<GraphQLCacheValue>>>}
107-
* @example <caption>How to await all loading [GraphQL operations]{@link GraphQL#operations} .</caption>
107+
* @example <caption>How to await all loading [GraphQL operations]{@link GraphQL#operations}.</caption>
108108
* ```js
109109
* await Promise.all(Object.values(graphql.operations).flat());
110110
* ```
@@ -157,9 +157,12 @@ module.exports = class GraphQL {
157157
/**
158158
* Loads a GraphQL operation, visible in
159159
* [GraphQL operations]{@link GraphQL#operations}. Emits a
160-
* [`GraphQL`]{@link GraphQL} instance `fetch` event if an already loading
161-
* operation isn’t reused, and a `cache` event once it’s loaded into the
162-
* [GraphQL cache]{@link GraphQL#cache}.
160+
* [`GraphQL`]{@link GraphQL} [`fetch`]{@link GraphQL#event:fetch} event once
161+
* the [`fetch`](https://developer.mozilla.org/docs/Web/API/Fetch_API) request
162+
* has been initiated and the map of loading
163+
* [GraphQL operations]{@link GraphQL#operations} has been updated, and a
164+
* [`GraphQL`]{@link GraphQL} [`cache`]{@link GraphQL#event:cache} event once
165+
* it’s loaded into the [GraphQL cache]{@link GraphQL#cache}.
163166
* @kind function
164167
* @name GraphQL#operate
165168
* @param {object} options Options.

0 commit comments

Comments
 (0)