Skip to content

Commit 729461d

Browse files
authored
Merge pull request #385 from equalogic/renovate/eslint
Update eslint
2 parents 4a6ea24 + c17e0e9 commit 729461d

File tree

4 files changed

+97
-99
lines changed

4 files changed

+97
-99
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class PersonConnection extends createConnectionType(PersonEdge) {}
3939

4040
### Create a Connection Arguments type
4141

42-
Extend a class from `ConnectionArgs` class to have pagination arguments pre-defined for you. You can additionally
42+
Extend a class from `ConnectionArgs` class to have pagination arguments pre-defined for you. You can additionally
4343
define your own arguments for filtering, etc.
4444

4545
```ts
@@ -51,7 +51,7 @@ export class PersonConnectionArgs extends ConnectionArgs {
5151
/*
5252
* PersonConnectionArgs will inherit `first`, `last`, `before`, `after`, and `page` fields from ConnectionArgs
5353
*/
54-
54+
5555
// Optional: example of a custom argument for filtering
5656
@Field(type => ID, { nullable: true })
5757
public personId?: string;
@@ -76,20 +76,18 @@ import { OffsetCursorPaginator } from 'nestjs-graphql-connection';
7676
@Resolver()
7777
export class PersonQueryResolver {
7878
@Query(returns => PersonConnection)
79-
public async persons(
80-
@Args() connectionArgs: PersonConnectionArgs,
81-
): Promise<PersonConnection> {
79+
public async persons(@Args() connectionArgs: PersonConnectionArgs): Promise<PersonConnection> {
8280
const { personId } = connectionArgs;
83-
81+
8482
// Example: Count the total number of matching persons (ignoring pagination)
8583
const totalPersons = await countPersons({ where: { personId } });
8684

8785
// Create paginator instance
8886
const paginator = OffsetCursorPaginator.createFromConnectionArgs(connectionArgs, totalPersons);
8987

9088
// Example: Do whatever you need to do to fetch the current page of persons
91-
const persons = await fetchPersons({
92-
where: { personId },
89+
const persons = await fetchPersons({
90+
where: { personId },
9391
take: paginator.take, // how many rows to fetch
9492
skip: paginator.skip, // row offset to fetch from
9593
});

package-lock.json

Lines changed: 87 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
"@types/graphql-relay": "0.6.0",
3838
"@types/jest": "27.4.0",
3939
"@types/node": "16.11.21",
40-
"@typescript-eslint/eslint-plugin": "5.10.1",
41-
"@typescript-eslint/parser": "5.10.1",
40+
"@typescript-eslint/eslint-plugin": "5.10.2",
41+
"@typescript-eslint/parser": "5.10.2",
4242
"barrelsby": "2.3.2",
43-
"eslint": "8.7.0",
43+
"eslint": "8.8.0",
4444
"eslint-config-prettier": "8.3.0",
4545
"eslint-import-resolver-typescript": "2.5.0",
4646
"eslint-plugin-import": "2.25.4",

src/cursor/OffsetCursorPaginator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ConnectionArgsValidationError, CursorValidationError } from '../error';
55

66
export type OffsetCursorParameters = {
77
offset: number;
8-
}
8+
};
99

1010
export class OffsetCursor extends Cursor<OffsetCursorParameters> {
1111
public static create(encodedString: string): OffsetCursor {

0 commit comments

Comments
 (0)