Skip to content

Commit

Permalink
Doc: Update getEntityRecord/s param description (#42488)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Jul 19, 2022
1 parent 6105ee5 commit e7bc014
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/reference-guides/data/data-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ _Parameters_
- _kind_ `K`: Entity kind.
- _name_ `N`: Entity name.
- _key_ `KeyOf< R >`: Record's key
- _query_ Optional query.
- _query_ Optional query. If requesting specific fields, fields must always include the ID.

_Returns_

Expand Down Expand Up @@ -289,7 +289,7 @@ _Parameters_
- _state_ `State`: State tree
- _kind_ `K`: Entity kind.
- _name_ `N`: Entity name.
- _query_ Optional terms query.
- _query_ Optional terms query. If requesting specific fields, fields must always include the ID.

_Returns_

Expand Down
4 changes: 2 additions & 2 deletions packages/core-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ _Parameters_
- _kind_ `K`: Entity kind.
- _name_ `N`: Entity name.
- _key_ `KeyOf< R >`: Record's key
- _query_ Optional query.
- _query_ Optional query. If requesting specific fields, fields must always include the ID.

_Returns_

Expand Down Expand Up @@ -536,7 +536,7 @@ _Parameters_
- _state_ `State`: State tree
- _kind_ `K`: Entity kind.
- _name_ `N`: Entity name.
- _query_ Optional terms query.
- _query_ Optional terms query. If requesting specific fields, fields must always include the ID.

_Returns_

Expand Down
6 changes: 4 additions & 2 deletions packages/core-data/src/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export const getCurrentUser =
* @param {string} name Entity name.
* @param {number|string} key Record's key
* @param {Object|undefined} query Optional object of query parameters to
* include with request.
* include with request. If requesting specific
* fields, fields must always include the ID.
*/
export const getEntityRecord =
( kind, name, key = '', query ) =>
Expand Down Expand Up @@ -131,7 +132,8 @@ export const getEditedEntityRecord = forwardResolver( 'getEntityRecord' );
*
* @param {string} kind Entity kind.
* @param {string} name Entity name.
* @param {Object?} query Query Object.
* @param {Object?} query Query Object. If requesting specific fields, fields
* must always include the ID.
*/
export const getEntityRecords =
( kind, name, query = {} ) =>
Expand Down
6 changes: 4 additions & 2 deletions packages/core-data/src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ interface GetEntityRecord {
* @param kind Entity kind.
* @param name Entity name.
* @param key Record's key
* @param query Optional query.
* @param query Optional query. If requesting specific
* fields, fields must always include the ID.
*
* @return Record.
*/
Expand Down Expand Up @@ -526,7 +527,8 @@ interface GetEntityRecords {
* @param state State tree
* @param kind Entity kind.
* @param name Entity name.
* @param query Optional terms query.
* @param query Optional terms query. If requesting specific
* fields, fields must always include the ID.
*
* @return Records.
*/
Expand Down

0 comments on commit e7bc014

Please sign in to comment.