Skip to content

Commit 45c8dd6

Browse files
committed
feat: add User.salary field with Decimal128 type
1 parent d930f7f commit 45c8dd6

File tree

8 files changed

+1495
-297
lines changed

8 files changed

+1495
-297
lines changed

examples/user/data/schema.graphql

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ input AgeOperatorsFilterUserInput {
141141
nin: [Float]
142142
}
143143

144+
"""
145+
The `Decimal` scalar type uses the IEEE 754 decimal128 decimal-based
146+
floating-point numbering format. Supports 34 decimal digits of precision, a max
147+
value of approximately 10^6145, and min value of approximately -10^6145
148+
"""
149+
scalar BSONDecimal
150+
144151
input CreateManyUserInput {
145152
name: String
146153
age: Float
@@ -151,6 +158,7 @@ input CreateManyUserInput {
151158

152159
"""Some dynamic data"""
153160
someMixed: JSON
161+
salary: BSONDecimal
154162
}
155163

156164
type CreateManyUserPayload {
@@ -174,6 +182,7 @@ input CreateOneUserInput {
174182

175183
"""Some dynamic data"""
176184
someMixed: JSON
185+
salary: BSONDecimal
177186
}
178187

179188
type CreateOneUserPayload {
@@ -206,6 +215,7 @@ input FilterFindManyUserInput {
206215

207216
"""Some dynamic data"""
208217
someMixed: JSON
218+
salary: BSONDecimal
209219
_id: MongoID
210220
_ids: [MongoID]
211221

@@ -228,6 +238,7 @@ input FilterFindOneUserInput {
228238

229239
"""Some dynamic data"""
230240
someMixed: JSON
241+
salary: BSONDecimal
231242
_id: MongoID
232243
_ids: [MongoID]
233244

@@ -247,6 +258,7 @@ input FilterRemoveManyUserInput {
247258

248259
"""Some dynamic data"""
249260
someMixed: JSON
261+
salary: BSONDecimal
250262
_id: MongoID
251263
_ids: [MongoID]
252264

@@ -266,6 +278,7 @@ input FilterRemoveOneUserInput {
266278

267279
"""Some dynamic data"""
268280
someMixed: JSON
281+
salary: BSONDecimal
269282
_id: MongoID
270283
_ids: [MongoID]
271284

@@ -285,6 +298,7 @@ input FilterUpdateManyUserInput {
285298

286299
"""Some dynamic data"""
287300
someMixed: JSON
301+
salary: BSONDecimal
288302
_id: MongoID
289303
_ids: [MongoID]
290304

@@ -304,6 +318,7 @@ input FilterUpdateOneUserInput {
304318

305319
"""Some dynamic data"""
306320
someMixed: JSON
321+
salary: BSONDecimal
307322
_id: MongoID
308323
_ids: [MongoID]
309324

@@ -323,6 +338,7 @@ input FilterUserInput {
323338

324339
"""Some dynamic data"""
325340
someMixed: JSON
341+
salary: BSONDecimal
326342
_id: MongoID
327343
_ids: [MongoID]
328344

@@ -566,6 +582,7 @@ input OperatorsFilterFindManyUserInput {
566582
name: NameOperatorsFilterFindManyUserInput
567583
age: AgeOperatorsFilterFindManyUserInput
568584
gender: GenderOperatorsFilterFindManyUserInput
585+
salary: SalaryOperatorsFilterFindManyUserInput
569586
_id: _idOperatorsFilterFindManyUserInput
570587
}
571588

@@ -574,6 +591,7 @@ input OperatorsFilterFindOneUserInput {
574591
name: NameOperatorsFilterFindOneUserInput
575592
age: AgeOperatorsFilterFindOneUserInput
576593
gender: GenderOperatorsFilterFindOneUserInput
594+
salary: SalaryOperatorsFilterFindOneUserInput
577595
_id: _idOperatorsFilterFindOneUserInput
578596
}
579597

@@ -582,6 +600,7 @@ input OperatorsFilterRemoveManyUserInput {
582600
name: NameOperatorsFilterRemoveManyUserInput
583601
age: AgeOperatorsFilterRemoveManyUserInput
584602
gender: GenderOperatorsFilterRemoveManyUserInput
603+
salary: SalaryOperatorsFilterRemoveManyUserInput
585604
_id: _idOperatorsFilterRemoveManyUserInput
586605
}
587606

@@ -590,6 +609,7 @@ input OperatorsFilterRemoveOneUserInput {
590609
name: NameOperatorsFilterRemoveOneUserInput
591610
age: AgeOperatorsFilterRemoveOneUserInput
592611
gender: GenderOperatorsFilterRemoveOneUserInput
612+
salary: SalaryOperatorsFilterRemoveOneUserInput
593613
_id: _idOperatorsFilterRemoveOneUserInput
594614
}
595615

@@ -598,6 +618,7 @@ input OperatorsFilterUpdateManyUserInput {
598618
name: NameOperatorsFilterUpdateManyUserInput
599619
age: AgeOperatorsFilterUpdateManyUserInput
600620
gender: GenderOperatorsFilterUpdateManyUserInput
621+
salary: SalaryOperatorsFilterUpdateManyUserInput
601622
_id: _idOperatorsFilterUpdateManyUserInput
602623
}
603624

@@ -606,6 +627,7 @@ input OperatorsFilterUpdateOneUserInput {
606627
name: NameOperatorsFilterUpdateOneUserInput
607628
age: AgeOperatorsFilterUpdateOneUserInput
608629
gender: GenderOperatorsFilterUpdateOneUserInput
630+
salary: SalaryOperatorsFilterUpdateOneUserInput
609631
_id: _idOperatorsFilterUpdateOneUserInput
610632
}
611633

@@ -614,6 +636,7 @@ input OperatorsFilterUserInput {
614636
name: NameOperatorsFilterUserInput
615637
age: AgeOperatorsFilterUserInput
616638
gender: GenderOperatorsFilterUserInput
639+
salary: SalaryOperatorsFilterUserInput
617640
_id: _idOperatorsFilterUserInput
618641
}
619642

@@ -712,6 +735,76 @@ type RemoveOneUserPayload {
712735
record: User
713736
}
714737

738+
input SalaryOperatorsFilterFindManyUserInput {
739+
gt: BSONDecimal
740+
gte: BSONDecimal
741+
lt: BSONDecimal
742+
lte: BSONDecimal
743+
ne: BSONDecimal
744+
in: [BSONDecimal]
745+
nin: [BSONDecimal]
746+
}
747+
748+
input SalaryOperatorsFilterFindOneUserInput {
749+
gt: BSONDecimal
750+
gte: BSONDecimal
751+
lt: BSONDecimal
752+
lte: BSONDecimal
753+
ne: BSONDecimal
754+
in: [BSONDecimal]
755+
nin: [BSONDecimal]
756+
}
757+
758+
input SalaryOperatorsFilterRemoveManyUserInput {
759+
gt: BSONDecimal
760+
gte: BSONDecimal
761+
lt: BSONDecimal
762+
lte: BSONDecimal
763+
ne: BSONDecimal
764+
in: [BSONDecimal]
765+
nin: [BSONDecimal]
766+
}
767+
768+
input SalaryOperatorsFilterRemoveOneUserInput {
769+
gt: BSONDecimal
770+
gte: BSONDecimal
771+
lt: BSONDecimal
772+
lte: BSONDecimal
773+
ne: BSONDecimal
774+
in: [BSONDecimal]
775+
nin: [BSONDecimal]
776+
}
777+
778+
input SalaryOperatorsFilterUpdateManyUserInput {
779+
gt: BSONDecimal
780+
gte: BSONDecimal
781+
lt: BSONDecimal
782+
lte: BSONDecimal
783+
ne: BSONDecimal
784+
in: [BSONDecimal]
785+
nin: [BSONDecimal]
786+
}
787+
788+
input SalaryOperatorsFilterUpdateOneUserInput {
789+
gt: BSONDecimal
790+
gte: BSONDecimal
791+
lt: BSONDecimal
792+
lte: BSONDecimal
793+
ne: BSONDecimal
794+
in: [BSONDecimal]
795+
nin: [BSONDecimal]
796+
}
797+
798+
input SalaryOperatorsFilterUserInput {
799+
gt: BSONDecimal
800+
gte: BSONDecimal
801+
lt: BSONDecimal
802+
lte: BSONDecimal
803+
ne: BSONDecimal
804+
in: [BSONDecimal]
805+
nin: [BSONDecimal]
806+
}
807+
715808
enum SortConnectionUserEnum {
716809
_ID_DESC
717810
_ID_ASC
@@ -724,6 +817,8 @@ enum SortFindByIdsUserInput {
724817
NAME_DESC
725818
AGE_ASC
726819
AGE_DESC
820+
SALARY_ASC
821+
SALARY_DESC
727822
GENDER_ASC
728823
GENDER_DESC
729824
GENDER__AGE_ASC
@@ -737,6 +832,8 @@ enum SortFindManyUserInput {
737832
NAME_DESC
738833
AGE_ASC
739834
AGE_DESC
835+
SALARY_ASC
836+
SALARY_DESC
740837
GENDER_ASC
741838
GENDER_DESC
742839
GENDER__AGE_ASC
@@ -750,6 +847,8 @@ enum SortFindOneUserInput {
750847
NAME_DESC
751848
AGE_ASC
752849
AGE_DESC
850+
SALARY_ASC
851+
SALARY_DESC
753852
GENDER_ASC
754853
GENDER_DESC
755854
GENDER__AGE_ASC
@@ -763,6 +862,8 @@ enum SortRemoveOneUserInput {
763862
NAME_DESC
764863
AGE_ASC
765864
AGE_DESC
865+
SALARY_ASC
866+
SALARY_DESC
766867
GENDER_ASC
767868
GENDER_DESC
768869
GENDER__AGE_ASC
@@ -776,6 +877,8 @@ enum SortUpdateManyUserInput {
776877
NAME_DESC
777878
AGE_ASC
778879
AGE_DESC
880+
SALARY_ASC
881+
SALARY_DESC
779882
GENDER_ASC
780883
GENDER_DESC
781884
GENDER__AGE_ASC
@@ -789,6 +892,8 @@ enum SortUpdateOneUserInput {
789892
NAME_DESC
790893
AGE_ASC
791894
AGE_DESC
895+
SALARY_ASC
896+
SALARY_DESC
792897
GENDER_ASC
793898
GENDER_DESC
794899
GENDER__AGE_ASC
@@ -805,6 +910,7 @@ input UpdateByIdUserInput {
805910

806911
"""Some dynamic data"""
807912
someMixed: JSON
913+
salary: BSONDecimal
808914
_id: MongoID!
809915
}
810916

@@ -826,6 +932,7 @@ input UpdateManyUserInput {
826932

827933
"""Some dynamic data"""
828934
someMixed: JSON
935+
salary: BSONDecimal
829936
}
830937

831938
type UpdateManyUserPayload {
@@ -843,6 +950,7 @@ input UpdateOneUserInput {
843950

844951
"""Some dynamic data"""
845952
someMixed: JSON
953+
salary: BSONDecimal
846954
}
847955

848956
type UpdateOneUserPayload {
@@ -863,6 +971,7 @@ type User {
863971

864972
"""Some dynamic data"""
865973
someMixed: JSON
974+
salary: BSONDecimal
866975
_id: MongoID!
867976
virtualField(lang: String): String
868977
}

0 commit comments

Comments
 (0)