Skip to content

Commit 5f7202b

Browse files
authored
docs: payload proper nouns (#11792)
Uses proper nouns in the docs where necessary for "Payload" and "Local API".
1 parent 4081953 commit 5f7202b

File tree

17 files changed

+25
-25
lines changed

17 files changed

+25
-25
lines changed

docs/admin/customizing-css.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ To override existing styles in a way that the previous rules of specificity woul
4545

4646
```css
4747
@layer payload-default {
48-
// my styles within the payload specificity
48+
// my styles within the Payload specificity
4949
}
5050
```
5151

docs/authentication/operations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ const token = await payload.forgotPassword({
353353
data: {
354354
email: 'dev@payloadcms.com',
355355
},
356-
disableEmail: false, // you can disable the auto-generation of email via local API
356+
disableEmail: false, // you can disable the auto-generation of email via Local API
357357
})
358358
```
359359

@@ -370,7 +370,7 @@ const token = await payload.forgotPassword({
370370
<Banner type="success">
371371
**Tip:**
372372

373-
You can stop the reset-password email from being sent via using the local API. This is helpful if
373+
You can stop the reset-password email from being sent via using the Local API. This is helpful if
374374
you need to create user accounts programmatically, but not set their password for them. This
375375
effectively generates a reset password token which you can then use to send to a page you create,
376376
allowing a user to "complete" their account by setting their password. In the background, you'd

docs/configuration/localization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ _\* An asterisk denotes that a property is required._
107107
In some projects you may want to filter the available locales shown in the admin UI selector. You can do this by providing a `filterAvailableLocales` function in your Payload Config. This is called on the server side and is passed the array of locales. This means that you can determine what locales are visible in the localizer selection menu at the top of the admin panel. You could do this per user, or implement a function that scopes these to tenants and more. Here is an example using request headers in a multi-tenant application:
108108

109109
```ts
110-
// ... rest of payload config
110+
// ... rest of Payload config
111111
localization: {
112112
defaultLocale: 'en',
113113
locales: ['en', 'es'],

docs/database/migrations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
5353
## Using Transactions
5454

5555
When migrations are run, each migration is performed in a new [transaction](/docs/database/transactions) for you. All
56-
you need to do is pass the `req` object to any [local API](/docs/local-api/overview) or direct database calls, such as
56+
you need to do is pass the `req` object to any [Local API](/docs/local-api/overview) or direct database calls, such as
5757
`payload.db.updateMany()`, to make database changes inside the transaction. Assuming no errors were thrown, the transaction is committed
5858
after your `up` or `down` function runs. If the migration errors at any point or fails to commit, it is caught and the
5959
transaction gets aborted. This way no change is made to the database if the migration fails.

docs/database/transactions.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ const afterChange: CollectionAfterChangeHook = async ({ req }) => {
6969

7070
## Direct Transaction Access
7171

72-
When writing your own scripts or custom endpoints, you may wish to have direct control over transactions. This is useful for interacting with your database outside of Payload's local API.
72+
When writing your own scripts or custom endpoints, you may wish to have direct control over transactions. This is useful for interacting with your database outside of Payload's Local API.
7373

7474
The following functions can be used for managing transactions:
7575

7676
- `payload.db.beginTransaction` - Starts a new session and returns a transaction ID for use in other Payload Local API calls.
7777
- `payload.db.commitTransaction` - Takes the identifier for the transaction, finalizes any changes.
7878
- `payload.db.rollbackTransaction` - Takes the identifier for the transaction, discards any changes.
7979

80-
Payload uses the `req` object to pass the transaction ID through to the database adapter. If you are not using the `req` object, you can make a new object to pass the transaction ID directly to database adapter methods and local API calls.
80+
Payload uses the `req` object to pass the transaction ID through to the database adapter. If you are not using the `req` object, you can make a new object to pass the transaction ID directly to database adapter methods and Local API calls.
8181
Example:
8282

8383
```ts
@@ -91,7 +91,7 @@ const standalonePayloadScript = async () => {
9191
const transactionID = await payload.db.beginTransaction()
9292

9393
try {
94-
// Make an update using the local API
94+
// Make an update using the Local API
9595
await payload.update({
9696
collection: 'posts',
9797
data: {
@@ -123,7 +123,7 @@ standalonePayloadScript()
123123

124124
If you wish to disable transactions entirely, you can do so by passing `false` as the `transactionOptions` in your database adapter configuration. All the official Payload database adapters support this option.
125125

126-
In addition to allowing database transactions to be disabled at the adapter level. You can prevent Payload from using a transaction in direct calls to the local API by adding `disableTransaction: true` to the args. For example:
126+
In addition to allowing database transactions to be disabled at the adapter level. You can prevent Payload from using a transaction in direct calls to the Local API by adding `disableTransaction: true` to the args. For example:
127127

128128
```ts
129129
await payload.update({

docs/fields/join.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ The following query options are supported:
236236
| **`sort`** | A string used to order related results |
237237
| **`count`** | Whether include the count of related documents or not. Not included by default |
238238

239-
These can be applied to the local API, GraphQL, and REST API.
239+
These can be applied to the Local API, GraphQL, and REST API.
240240

241241
### Local API
242242

243-
By adding `joins` to the local API you can customize the request for each join field by the `name` of the field.
243+
By adding `joins` to the Local API you can customize the request for each join field by the `name` of the field.
244244

245245
```js
246246
const result = await payload.find({
@@ -287,7 +287,7 @@ const result = await payload.find({
287287

288288
### Rest API
289289

290-
The rest API supports the same query options as the local API. You can use the `joins` query parameter to customize the
290+
The REST API supports the same query options as the Local API. You can use the `joins` query parameter to customize the
291291
request for each join field by the `name` of the field. For example, an API call to get a document with the related
292292
posts limited to 5 and sorted by title:
293293

docs/graphql/extending.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default buildConfig({
7070

7171
## Resolver function
7272

73-
In your resolver, make sure you set `depth: 0` if you're returning data directly from the local API so that GraphQL can correctly resolve queries to nested values such as relationship data.
73+
In your resolver, make sure you set `depth: 0` if you're returning data directly from the Local API so that GraphQL can correctly resolve queries to nested values such as relationship data.
7474

7575
Your function will receive four arguments you can make use of:
7676

docs/graphql/graphql-schema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ type Collection1 {
6060
}
6161
```
6262

63-
The above example outputs all your definitions to a file relative from your payload config as `./graphql/schema.graphql`. By default, the file will be output to your current working directory as `schema.graphql`.
63+
The above example outputs all your definitions to a file relative from your Payload config as `./graphql/schema.graphql`. By default, the file will be output to your current working directory as `schema.graphql`.
6464

6565
### Adding an npm script
6666

docs/hooks/context.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Context gives you a way forward on otherwise difficult problems such as:
1414

1515
1. **Passing data between Hooks**: Needing data in multiple Hooks from a 3rd party API, it could be retrieved and used in `beforeChange` and later used again in an `afterChange` hook without having to fetch it twice.
1616
2. **Preventing infinite loops**: Calling `payload.update()` on the same document that triggered an `afterChange` hook will create an infinite loop, control the flow by assigning a no-op condition to context
17-
3. **Passing data to local API**: Setting values on the `req.context` and pass it to `payload.create()` you can provide additional data to hooks without adding extraneous fields.
17+
3. **Passing data to Local API**: Setting values on the `req.context` and pass it to `payload.create()` you can provide additional data to hooks without adding extraneous fields.
1818
4. **Passing data between hooks and middleware or custom endpoints**: Hooks could set context across multiple collections and then be used in a final `postMiddleware`.
1919

2020
## How To Use Context

docs/jobs-queue/queues.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default buildConfig({
3939
tasks: [
4040
// your tasks here
4141
],
42-
// autoRun can optionally be a function that receives payload as an argument
42+
// autoRun can optionally be a function that receives `payload` as an argument
4343
autoRun: [
4444
{
4545
cron: '0 * * * *', // every hour at minute 0

0 commit comments

Comments
 (0)