Skip to content

Commit 10189fe

Browse files
committed
♻️ (graphql, typescript): remove unused connection field from query arguments
1 parent 10c94b1 commit 10189fe

File tree

10 files changed

+0
-98
lines changed

10 files changed

+0
-98
lines changed

examples/advanced-graphql/schema.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ export class ProductQueryArgs {
512512
last?: number | undefined;
513513
@Field(() => String, { nullable: true })
514514
before?: string | undefined;
515-
@Field(() => Boolean, { nullable: true })
516-
connection?: boolean | undefined;
517515
}
518516

519517
@InputType()
@@ -530,8 +528,6 @@ export class ReviewQueryArgs {
530528
last?: number | undefined;
531529
@Field(() => String, { nullable: true })
532530
before?: string | undefined;
533-
@Field(() => Boolean, { nullable: true })
534-
connection?: boolean | undefined;
535531
}
536532

537533
@InputType()
@@ -548,8 +544,6 @@ export class TagQueryArgs {
548544
last?: number | undefined;
549545
@Field(() => String, { nullable: true })
550546
before?: string | undefined;
551-
@Field(() => Boolean, { nullable: true })
552-
connection?: boolean | undefined;
553547
}
554548

555549
@InputType()
@@ -566,6 +560,4 @@ export class ProductTagQueryArgs {
566560
last?: number | undefined;
567561
@Field(() => String, { nullable: true })
568562
before?: string | undefined;
569-
@Field(() => Boolean, { nullable: true })
570-
connection?: boolean | undefined;
571563
}

examples/basic/schema.graphql

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,6 @@ input AuthorQueryArgs {
420420

421421
"""Cursor for pagination before this item"""
422422
before: String
423-
424-
"""Return connection format with edges and pageInfo"""
425-
connection: Boolean
426423
}
427424

428425
"""Query arguments for Book with optional filter, sort, and pagination"""
@@ -444,9 +441,6 @@ input BookQueryArgs {
444441

445442
"""Cursor for pagination before this item"""
446443
before: String
447-
448-
"""Return connection format with edges and pageInfo"""
449-
connection: Boolean
450444
}
451445

452446
"""Query arguments for Review with optional filter, sort, and pagination"""
@@ -468,9 +462,6 @@ input ReviewQueryArgs {
468462

469463
"""Cursor for pagination before this item"""
470464
before: String
471-
472-
"""Return connection format with edges and pageInfo"""
473-
connection: Boolean
474465
}
475466

476467
"""Query arguments for Article with optional filter, sort, and pagination"""
@@ -492,9 +483,6 @@ input ArticleQueryArgs {
492483

493484
"""Cursor for pagination before this item"""
494485
before: String
495-
496-
"""Return connection format with edges and pageInfo"""
497-
connection: Boolean
498486
}
499487

500488
"""
@@ -518,7 +506,4 @@ input PublisherQueryArgs {
518506

519507
"""Cursor for pagination before this item"""
520508
before: String
521-
522-
"""Return connection format with edges and pageInfo"""
523-
connection: Boolean
524509
}

examples/custom-naming/schema.graphql

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,6 @@ input CustomerQueryArgs {
477477

478478
"""Cursor for pagination before this item"""
479479
before: String
480-
481-
"""Return connection format with edges and pageInfo"""
482-
connection: Boolean
483480
}
484481

485482
"""Query arguments for Product with optional filter, sort, and pagination"""
@@ -495,9 +492,6 @@ input ProductQueryArgs {
495492

496493
"""Cursor for pagination before this item"""
497494
before: String
498-
499-
"""Return connection format with edges and pageInfo"""
500-
connection: Boolean
501495
}
502496

503497
"""Query arguments for Address with optional filter, sort, and pagination"""
@@ -519,9 +513,6 @@ input AddressQueryArgs {
519513

520514
"""Cursor for pagination before this item"""
521515
before: String
522-
523-
"""Return connection format with edges and pageInfo"""
524-
connection: Boolean
525516
}
526517

527518
"""Query arguments for Order with optional filter, sort, and pagination"""
@@ -543,9 +534,6 @@ input OrderQueryArgs {
543534

544535
"""Cursor for pagination before this item"""
545536
before: String
546-
547-
"""Return connection format with edges and pageInfo"""
548-
connection: Boolean
549537
}
550538

551539
"""
@@ -569,9 +557,6 @@ input OrderItemQueryArgs {
569557

570558
"""Cursor for pagination before this item"""
571559
before: String
572-
573-
"""Return connection format with edges and pageInfo"""
574-
connection: Boolean
575560
}
576561

577562
"""
@@ -595,7 +580,4 @@ input CategoryQueryArgs {
595580

596581
"""Cursor for pagination before this item"""
597582
before: String
598-
599-
"""Return connection format with edges and pageInfo"""
600-
connection: Boolean
601583
}

examples/full-features/schema.graphql

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,6 @@ input MemberQueryArgs {
621621

622622
"""Cursor for pagination before this item"""
623623
before: String
624-
625-
"""Return connection format with edges and pageInfo"""
626-
connection: Boolean
627624
}
628625

629626
"""
@@ -647,9 +644,6 @@ input UserProfileQueryArgs {
647644

648645
"""Cursor for pagination before this item"""
649646
before: String
650-
651-
"""Return connection format with edges and pageInfo"""
652-
connection: Boolean
653647
}
654648

655649
"""Query arguments for Post with optional filter, sort, and pagination"""
@@ -671,9 +665,6 @@ input PostQueryArgs {
671665

672666
"""Cursor for pagination before this item"""
673667
before: String
674-
675-
"""Return connection format with edges and pageInfo"""
676-
connection: Boolean
677668
}
678669

679670
"""Query arguments for Comment with optional filter, sort, and pagination"""
@@ -695,9 +686,6 @@ input CommentQueryArgs {
695686

696687
"""Cursor for pagination before this item"""
697688
before: String
698-
699-
"""Return connection format with edges and pageInfo"""
700-
connection: Boolean
701689
}
702690

703691
"""
@@ -715,9 +703,6 @@ input ReactionQueryArgs {
715703

716704
"""Cursor for pagination before this item"""
717705
before: String
718-
719-
"""Return connection format with edges and pageInfo"""
720-
connection: Boolean
721706
}
722707

723708
"""Query arguments for Follow with optional filter, sort, and pagination"""
@@ -739,9 +724,6 @@ input FollowQueryArgs {
739724

740725
"""Cursor for pagination before this item"""
741726
before: String
742-
743-
"""Return connection format with edges and pageInfo"""
744-
connection: Boolean
745727
}
746728

747729
"""Query arguments for Tag with optional filter, sort, and pagination"""
@@ -763,9 +745,6 @@ input TagQueryArgs {
763745

764746
"""Cursor for pagination before this item"""
765747
before: String
766-
767-
"""Return connection format with edges and pageInfo"""
768-
connection: Boolean
769748
}
770749

771750
"""
@@ -789,7 +768,4 @@ input TagsOnPostsQueryArgs {
789768

790769
"""Cursor for pagination before this item"""
791770
before: String
792-
793-
"""Return connection format with edges and pageInfo"""
794-
connection: Boolean
795771
}

examples/graphql-server/src/schema.graphql

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,6 @@ input UserQueryArgs {
433433

434434
"""Cursor for pagination before this item"""
435435
before: String
436-
437-
"""Return connection format with edges and pageInfo"""
438-
connection: Boolean
439436
}
440437

441438
"""Query arguments for Post with optional filter, sort, and pagination"""
@@ -457,9 +454,6 @@ input PostQueryArgs {
457454

458455
"""Cursor for pagination before this item"""
459456
before: String
460-
461-
"""Return connection format with edges and pageInfo"""
462-
connection: Boolean
463457
}
464458

465459
"""
@@ -483,9 +477,6 @@ input CategoryQueryArgs {
483477

484478
"""Cursor for pagination before this item"""
485479
before: String
486-
487-
"""Return connection format with edges and pageInfo"""
488-
connection: Boolean
489480
}
490481

491482
"""
@@ -503,9 +494,6 @@ input PostCategoryQueryArgs {
503494

504495
"""Cursor for pagination before this item"""
505496
before: String
506-
507-
"""Return connection format with edges and pageInfo"""
508-
connection: Boolean
509497
}
510498

511499
"""Query arguments for Comment with optional filter, sort, and pagination"""
@@ -527,7 +515,4 @@ input CommentQueryArgs {
527515

528516
"""Cursor for pagination before this item"""
529517
before: String
530-
531-
"""Return connection format with edges and pageInfo"""
532-
connection: Boolean
533518
}

examples/type-graphql/schema.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,6 @@ export class UserQueryArgs {
522522
last?: number | undefined;
523523
@Field(() => String, { nullable: true })
524524
before?: string | undefined;
525-
@Field(() => Boolean, { nullable: true })
526-
connection?: boolean | undefined;
527525
}
528526

529527
@InputType()
@@ -540,8 +538,6 @@ export class PostQueryArgs {
540538
last?: number | undefined;
541539
@Field(() => String, { nullable: true })
542540
before?: string | undefined;
543-
@Field(() => Boolean, { nullable: true })
544-
connection?: boolean | undefined;
545541
}
546542

547543
@InputType()
@@ -558,8 +554,6 @@ export class CategoryQueryArgs {
558554
last?: number | undefined;
559555
@Field(() => String, { nullable: true })
560556
before?: string | undefined;
561-
@Field(() => Boolean, { nullable: true })
562-
connection?: boolean | undefined;
563557
}
564558

565559
@InputType()
@@ -572,8 +566,6 @@ export class PostCategoryQueryArgs {
572566
last?: number | undefined;
573567
@Field(() => String, { nullable: true })
574568
before?: string | undefined;
575-
@Field(() => Boolean, { nullable: true })
576-
connection?: boolean | undefined;
577569
}
578570

579571
@InputType()
@@ -590,6 +582,4 @@ export class CommentQueryArgs {
590582
last?: number | undefined;
591583
@Field(() => String, { nullable: true })
592584
before?: string | undefined;
593-
@Field(() => Boolean, { nullable: true })
594-
connection?: boolean | undefined;
595585
}

src/generators/strategies/graphql-output-strategy.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,6 @@ export class GraphQLOutputStrategy implements OutputStrategy {
335335
type: 'String',
336336
description: 'Cursor for pagination before this item',
337337
}
338-
fields.connection = {
339-
type: 'Boolean',
340-
description: 'Return connection format with edges and pageInfo',
341-
}
342338

343339
try {
344340
const queryArgsInputTC = this.schemaComposer.createInputTC({

src/generators/strategies/typescript-output-strategy.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ export class TypeScriptOutputStrategy implements OutputStrategy {
129129
{ name: 'after', type: 'String', nullable: true },
130130
{ name: 'last', type: 'Int', nullable: true },
131131
{ name: 'before', type: 'String', nullable: true },
132-
{ name: 'connection', type: 'Boolean', nullable: true },
133132
)
134133

135134
this.astFactory.createFilterInputType(queryArgsInputName, fields)

tests/unit/strategies/graphql-output-strategy.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ describe('GraphQL Output Strategy', () => {
459459
expect(queryArgs.hasField('after')).toBe(true)
460460
expect(queryArgs.hasField('last')).toBe(true)
461461
expect(queryArgs.hasField('before')).toBe(true)
462-
expect(queryArgs.hasField('connection')).toBe(true)
463462
})
464463

465464
it('should include filter and sort if they exist', () => {

tests/unit/strategies/typescript-output-strategy.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ describe('TypeScript Output Strategy', () => {
549549
{ name: 'after', type: 'String', nullable: true },
550550
{ name: 'last', type: 'Int', nullable: true },
551551
{ name: 'before', type: 'String', nullable: true },
552-
{ name: 'connection', type: 'Boolean', nullable: true },
553552
])
554553
})
555554

@@ -577,7 +576,6 @@ describe('TypeScript Output Strategy', () => {
577576
{ name: 'after', type: 'String', nullable: true },
578577
{ name: 'last', type: 'Int', nullable: true },
579578
{ name: 'before', type: 'String', nullable: true },
580-
{ name: 'connection', type: 'Boolean', nullable: true },
581579
])
582580
})
583581

0 commit comments

Comments
 (0)