adaptic-backend 1.0.292 → 1.0.294

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/Account.cjs +75 -21
  2. package/Action.cjs +75 -21
  3. package/Alert.cjs +75 -21
  4. package/AlpacaAccount.cjs +75 -21
  5. package/Asset.cjs +75 -21
  6. package/Authenticator.cjs +75 -21
  7. package/Contract.cjs +75 -21
  8. package/Customer.cjs +75 -21
  9. package/Deliverable.cjs +75 -21
  10. package/EconomicEvent.cjs +75 -21
  11. package/MarketSentiment.cjs +75 -21
  12. package/NewsArticle.cjs +75 -21
  13. package/NewsArticleAssetSentiment.cjs +75 -21
  14. package/Order.cjs +75 -21
  15. package/Position.cjs +75 -21
  16. package/ScheduledOptionOrder.cjs +75 -21
  17. package/Session.cjs +75 -21
  18. package/StopLoss.cjs +75 -21
  19. package/TakeProfit.cjs +75 -21
  20. package/Trade.cjs +75 -21
  21. package/User.cjs +75 -21
  22. package/VerificationToken.cjs +75 -21
  23. package/apollo-client.client.cjs +17 -0
  24. package/apollo-client.client.d.ts +7 -0
  25. package/apollo-client.server.cjs +21 -0
  26. package/apollo-client.server.d.ts +7 -0
  27. package/client.cjs +80 -59
  28. package/client.d.ts +26 -17
  29. package/esm/Account.d.ts.map +1 -1
  30. package/esm/Account.js.map +1 -1
  31. package/esm/Account.mjs +64 -10
  32. package/esm/Action.d.ts.map +1 -1
  33. package/esm/Action.js.map +1 -1
  34. package/esm/Action.mjs +64 -10
  35. package/esm/Alert.d.ts.map +1 -1
  36. package/esm/Alert.js.map +1 -1
  37. package/esm/Alert.mjs +64 -10
  38. package/esm/AlpacaAccount.d.ts.map +1 -1
  39. package/esm/AlpacaAccount.js.map +1 -1
  40. package/esm/AlpacaAccount.mjs +64 -10
  41. package/esm/Asset.d.ts.map +1 -1
  42. package/esm/Asset.js.map +1 -1
  43. package/esm/Asset.mjs +64 -10
  44. package/esm/Authenticator.d.ts.map +1 -1
  45. package/esm/Authenticator.js.map +1 -1
  46. package/esm/Authenticator.mjs +64 -10
  47. package/esm/Contract.d.ts.map +1 -1
  48. package/esm/Contract.js.map +1 -1
  49. package/esm/Contract.mjs +64 -10
  50. package/esm/Customer.d.ts.map +1 -1
  51. package/esm/Customer.js.map +1 -1
  52. package/esm/Customer.mjs +64 -10
  53. package/esm/Deliverable.d.ts.map +1 -1
  54. package/esm/Deliverable.js.map +1 -1
  55. package/esm/Deliverable.mjs +64 -10
  56. package/esm/EconomicEvent.d.ts.map +1 -1
  57. package/esm/EconomicEvent.js.map +1 -1
  58. package/esm/EconomicEvent.mjs +64 -10
  59. package/esm/MarketSentiment.d.ts.map +1 -1
  60. package/esm/MarketSentiment.js.map +1 -1
  61. package/esm/MarketSentiment.mjs +64 -10
  62. package/esm/NewsArticle.d.ts.map +1 -1
  63. package/esm/NewsArticle.js.map +1 -1
  64. package/esm/NewsArticle.mjs +64 -10
  65. package/esm/NewsArticleAssetSentiment.d.ts.map +1 -1
  66. package/esm/NewsArticleAssetSentiment.js.map +1 -1
  67. package/esm/NewsArticleAssetSentiment.mjs +64 -10
  68. package/esm/Order.d.ts.map +1 -1
  69. package/esm/Order.js.map +1 -1
  70. package/esm/Order.mjs +64 -10
  71. package/esm/Position.d.ts.map +1 -1
  72. package/esm/Position.js.map +1 -1
  73. package/esm/Position.mjs +64 -10
  74. package/esm/ScheduledOptionOrder.d.ts.map +1 -1
  75. package/esm/ScheduledOptionOrder.js.map +1 -1
  76. package/esm/ScheduledOptionOrder.mjs +64 -10
  77. package/esm/Session.d.ts.map +1 -1
  78. package/esm/Session.js.map +1 -1
  79. package/esm/Session.mjs +64 -10
  80. package/esm/StopLoss.d.ts.map +1 -1
  81. package/esm/StopLoss.js.map +1 -1
  82. package/esm/StopLoss.mjs +64 -10
  83. package/esm/TakeProfit.d.ts.map +1 -1
  84. package/esm/TakeProfit.js.map +1 -1
  85. package/esm/TakeProfit.mjs +64 -10
  86. package/esm/Trade.d.ts.map +1 -1
  87. package/esm/Trade.js.map +1 -1
  88. package/esm/Trade.mjs +64 -10
  89. package/esm/User.d.ts.map +1 -1
  90. package/esm/User.js.map +1 -1
  91. package/esm/User.mjs +64 -10
  92. package/esm/VerificationToken.d.ts.map +1 -1
  93. package/esm/VerificationToken.js.map +1 -1
  94. package/esm/VerificationToken.mjs +64 -10
  95. package/esm/apollo-client.client.d.ts +7 -0
  96. package/esm/apollo-client.client.d.ts.map +1 -0
  97. package/esm/apollo-client.client.js.map +1 -0
  98. package/esm/apollo-client.client.mjs +8 -0
  99. package/esm/apollo-client.server.d.ts +7 -0
  100. package/esm/apollo-client.server.d.ts.map +1 -0
  101. package/esm/apollo-client.server.js.map +1 -0
  102. package/esm/apollo-client.server.mjs +12 -0
  103. package/esm/client.d.ts +26 -17
  104. package/esm/client.d.ts.map +1 -1
  105. package/esm/client.js.map +1 -1
  106. package/esm/client.mjs +45 -60
  107. package/generated/typegraphql-prisma/enhance.cjs +7 -7
  108. package/generated/typegraphql-prisma/index.cjs +10 -10
  109. package/generated/typegraphql-prisma/resolvers/crud/args.index.cjs +22 -22
  110. package/generated/typegraphql-prisma/resolvers/crud/index.cjs +3 -3
  111. package/generated/typegraphql-prisma/resolvers/outputs/index.cjs +1 -1
  112. package/generated/typegraphql-prisma/resolvers/relations/args.index.cjs +11 -11
  113. package/generated/typegraphql-prisma/resolvers/relations/index.cjs +2 -2
  114. package/index.cjs +1 -1
  115. package/package.json +1 -1
  116. package/server.cjs +1 -1
package/TakeProfit.cjs CHANGED
@@ -24,8 +24,14 @@ exports.TakeProfit = {
24
24
  * @returns The created TakeProfit or null.
25
25
  */
26
26
  async create(props, globalClient) {
27
- const client = globalClient || client_1.client;
28
- const CREATE_ONE_TAKEPROFIT = (0, client_1.gql) `
27
+ const [modules, client] = await Promise.all([
28
+ (0, client_1.getApolloModules)(),
29
+ globalClient
30
+ ? Promise.resolve(globalClient)
31
+ : client_1.client
32
+ ]);
33
+ const { gql, ApolloError } = modules;
34
+ const CREATE_ONE_TAKEPROFIT = gql `
29
35
  mutation createOneTakeProfit($data: TakeProfitCreateInput!) {
30
36
  createOneTakeProfit(data: $data) {
31
37
  ${selectionSet}
@@ -675,8 +681,14 @@ exports.TakeProfit = {
675
681
  * @returns The count of created records or null.
676
682
  */
677
683
  async createMany(props, globalClient) {
678
- const client = globalClient || client_1.client;
679
- const CREATE_MANY_TAKEPROFIT = (0, client_1.gql) `
684
+ const [modules, client] = await Promise.all([
685
+ (0, client_1.getApolloModules)(),
686
+ globalClient
687
+ ? Promise.resolve(globalClient)
688
+ : client_1.client
689
+ ]);
690
+ const { gql, ApolloError } = modules;
691
+ const CREATE_MANY_TAKEPROFIT = gql `
680
692
  mutation createManyTakeProfit($data: [TakeProfitCreateManyInput!]!) {
681
693
  createManyTakeProfit(data: $data) {
682
694
  count
@@ -713,8 +725,14 @@ exports.TakeProfit = {
713
725
  * @returns The updated TakeProfit or null.
714
726
  */
715
727
  async update(props, globalClient) {
716
- const client = globalClient || client_1.client;
717
- const UPDATE_ONE_TAKEPROFIT = (0, client_1.gql) `
728
+ const [modules, client] = await Promise.all([
729
+ (0, client_1.getApolloModules)(),
730
+ globalClient
731
+ ? Promise.resolve(globalClient)
732
+ : client_1.client
733
+ ]);
734
+ const { gql, ApolloError } = modules;
735
+ const UPDATE_ONE_TAKEPROFIT = gql `
718
736
  mutation updateOneTakeProfit($data: TakeProfitUpdateInput!, $where: TakeProfitWhereUniqueInput!) {
719
737
  updateOneTakeProfit(data: $data, where: $where) {
720
738
  ${selectionSet}
@@ -3360,8 +3378,14 @@ exports.TakeProfit = {
3360
3378
  * @returns The updated TakeProfit or null.
3361
3379
  */
3362
3380
  async upsert(props, globalClient) {
3363
- const client = globalClient || client_1.client;
3364
- const UPSERT_ONE_TAKEPROFIT = (0, client_1.gql) `
3381
+ const [modules, client] = await Promise.all([
3382
+ (0, client_1.getApolloModules)(),
3383
+ globalClient
3384
+ ? Promise.resolve(globalClient)
3385
+ : client_1.client
3386
+ ]);
3387
+ const { gql, ApolloError } = modules;
3388
+ const UPSERT_ONE_TAKEPROFIT = gql `
3365
3389
  mutation upsertOneTakeProfit($where: TakeProfitWhereUniqueInput!, $create: TakeProfitCreateInput!, $update: TakeProfitUpdateInput!) {
3366
3390
  upsertOneTakeProfit(where: $where, create: $create, update: $update) {
3367
3391
  ${selectionSet}
@@ -6615,8 +6639,14 @@ exports.TakeProfit = {
6615
6639
  * @returns The count of created records or null.
6616
6640
  */
6617
6641
  async updateMany(props, globalClient) {
6618
- const client = globalClient || client_1.client;
6619
- const UPDATE_MANY_TAKEPROFIT = (0, client_1.gql) `
6642
+ const [modules, client] = await Promise.all([
6643
+ (0, client_1.getApolloModules)(),
6644
+ globalClient
6645
+ ? Promise.resolve(globalClient)
6646
+ : client_1.client
6647
+ ]);
6648
+ const { gql, ApolloError } = modules;
6649
+ const UPDATE_MANY_TAKEPROFIT = gql `
6620
6650
  mutation updateManyTakeProfit($data: [TakeProfitCreateManyInput!]!) {
6621
6651
  updateManyTakeProfit(data: $data) {
6622
6652
  count
@@ -9262,8 +9292,14 @@ exports.TakeProfit = {
9262
9292
  * @returns The deleted TakeProfit or null.
9263
9293
  */
9264
9294
  async delete(props, globalClient) {
9265
- const client = globalClient || client_1.client;
9266
- const DELETE_ONE_TAKEPROFIT = (0, client_1.gql) `
9295
+ const [modules, client] = await Promise.all([
9296
+ (0, client_1.getApolloModules)(),
9297
+ globalClient
9298
+ ? Promise.resolve(globalClient)
9299
+ : client_1.client
9300
+ ]);
9301
+ const { gql, ApolloError } = modules;
9302
+ const DELETE_ONE_TAKEPROFIT = gql `
9267
9303
  mutation deleteOneTakeProfit($where: TakeProfitWhereUniqueInput!) {
9268
9304
  deleteOneTakeProfit(where: $where) {
9269
9305
  ${selectionSet}
@@ -9299,8 +9335,14 @@ exports.TakeProfit = {
9299
9335
  */
9300
9336
  async get(props, globalClient) {
9301
9337
  var _a, _b;
9302
- const client = globalClient || client_1.client;
9303
- const GET_TAKEPROFIT = (0, client_1.gql) `
9338
+ const [modules, client] = await Promise.all([
9339
+ (0, client_1.getApolloModules)(),
9340
+ globalClient
9341
+ ? Promise.resolve(globalClient)
9342
+ : client_1.client
9343
+ ]);
9344
+ const { gql, ApolloError } = modules;
9345
+ const GET_TAKEPROFIT = gql `
9304
9346
  query getTakeProfit($where: TakeProfitWhereUniqueInput!) {
9305
9347
  getTakeProfit(where: $where) {
9306
9348
  ${selectionSet}
@@ -9320,7 +9362,7 @@ exports.TakeProfit = {
9320
9362
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getTakeProfit) !== null && _b !== void 0 ? _b : null;
9321
9363
  }
9322
9364
  catch (error) {
9323
- if (error instanceof client_1.ApolloError && error.message === 'No TakeProfit found') {
9365
+ if (error instanceof ApolloError && error.message === 'No TakeProfit found') {
9324
9366
  return null;
9325
9367
  }
9326
9368
  else {
@@ -9336,8 +9378,14 @@ exports.TakeProfit = {
9336
9378
  */
9337
9379
  async getAll(globalClient) {
9338
9380
  var _a, _b;
9339
- const client = globalClient || client_1.client;
9340
- const GET_ALL_TAKEPROFIT = (0, client_1.gql) `
9381
+ const [modules, client] = await Promise.all([
9382
+ (0, client_1.getApolloModules)(),
9383
+ globalClient
9384
+ ? Promise.resolve(globalClient)
9385
+ : client_1.client
9386
+ ]);
9387
+ const { gql, ApolloError } = modules;
9388
+ const GET_ALL_TAKEPROFIT = gql `
9341
9389
  query getAllTakeProfit {
9342
9390
  takeProfits {
9343
9391
  ${selectionSet}
@@ -9350,7 +9398,7 @@ exports.TakeProfit = {
9350
9398
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.takeProfits) !== null && _b !== void 0 ? _b : null;
9351
9399
  }
9352
9400
  catch (error) {
9353
- if (error instanceof client_1.ApolloError && error.message === 'No TakeProfit found') {
9401
+ if (error instanceof ApolloError && error.message === 'No TakeProfit found') {
9354
9402
  return null;
9355
9403
  }
9356
9404
  else {
@@ -9366,8 +9414,14 @@ exports.TakeProfit = {
9366
9414
  * @returns An array of found TakeProfit records or null.
9367
9415
  */
9368
9416
  async findMany(props, globalClient) {
9369
- const client = globalClient || client_1.client;
9370
- const FIND_MANY_TAKEPROFIT = (0, client_1.gql) `
9417
+ const [modules, client] = await Promise.all([
9418
+ (0, client_1.getApolloModules)(),
9419
+ globalClient
9420
+ ? Promise.resolve(globalClient)
9421
+ : client_1.client
9422
+ ]);
9423
+ const { gql, ApolloError } = modules;
9424
+ const FIND_MANY_TAKEPROFIT = gql `
9371
9425
  query findManyTakeProfit($where: TakeProfitWhereInput!) {
9372
9426
  takeProfits(where: $where) {
9373
9427
  ${selectionSet}
@@ -9396,7 +9450,7 @@ exports.TakeProfit = {
9396
9450
  }
9397
9451
  }
9398
9452
  catch (error) {
9399
- if (error instanceof client_1.ApolloError && error.message === 'No TakeProfit found') {
9453
+ if (error instanceof ApolloError && error.message === 'No TakeProfit found') {
9400
9454
  return null;
9401
9455
  }
9402
9456
  else {
package/Trade.cjs CHANGED
@@ -229,8 +229,14 @@ exports.Trade = {
229
229
  * @returns The created Trade or null.
230
230
  */
231
231
  async create(props, globalClient) {
232
- const client = globalClient || client_1.client;
233
- const CREATE_ONE_TRADE = (0, client_1.gql) `
232
+ const [modules, client] = await Promise.all([
233
+ (0, client_1.getApolloModules)(),
234
+ globalClient
235
+ ? Promise.resolve(globalClient)
236
+ : client_1.client
237
+ ]);
238
+ const { gql, ApolloError } = modules;
239
+ const CREATE_ONE_TRADE = gql `
234
240
  mutation createOneTrade($data: TradeCreateInput!) {
235
241
  createOneTrade(data: $data) {
236
242
  ${selectionSet}
@@ -1574,8 +1580,14 @@ exports.Trade = {
1574
1580
  * @returns The count of created records or null.
1575
1581
  */
1576
1582
  async createMany(props, globalClient) {
1577
- const client = globalClient || client_1.client;
1578
- const CREATE_MANY_TRADE = (0, client_1.gql) `
1583
+ const [modules, client] = await Promise.all([
1584
+ (0, client_1.getApolloModules)(),
1585
+ globalClient
1586
+ ? Promise.resolve(globalClient)
1587
+ : client_1.client
1588
+ ]);
1589
+ const { gql, ApolloError } = modules;
1590
+ const CREATE_MANY_TRADE = gql `
1579
1591
  mutation createManyTrade($data: [TradeCreateManyInput!]!) {
1580
1592
  createManyTrade(data: $data) {
1581
1593
  count
@@ -1622,8 +1634,14 @@ exports.Trade = {
1622
1634
  * @returns The updated Trade or null.
1623
1635
  */
1624
1636
  async update(props, globalClient) {
1625
- const client = globalClient || client_1.client;
1626
- const UPDATE_ONE_TRADE = (0, client_1.gql) `
1637
+ const [modules, client] = await Promise.all([
1638
+ (0, client_1.getApolloModules)(),
1639
+ globalClient
1640
+ ? Promise.resolve(globalClient)
1641
+ : client_1.client
1642
+ ]);
1643
+ const { gql, ApolloError } = modules;
1644
+ const UPDATE_ONE_TRADE = gql `
1627
1645
  mutation updateOneTrade($data: TradeUpdateInput!, $where: TradeWhereUniqueInput!) {
1628
1646
  updateOneTrade(data: $data, where: $where) {
1629
1647
  ${selectionSet}
@@ -7204,8 +7222,14 @@ exports.Trade = {
7204
7222
  * @returns The updated Trade or null.
7205
7223
  */
7206
7224
  async upsert(props, globalClient) {
7207
- const client = globalClient || client_1.client;
7208
- const UPSERT_ONE_TRADE = (0, client_1.gql) `
7225
+ const [modules, client] = await Promise.all([
7226
+ (0, client_1.getApolloModules)(),
7227
+ globalClient
7228
+ ? Promise.resolve(globalClient)
7229
+ : client_1.client
7230
+ ]);
7231
+ const { gql, ApolloError } = modules;
7232
+ const UPSERT_ONE_TRADE = gql `
7209
7233
  mutation upsertOneTrade($where: TradeWhereUniqueInput!, $create: TradeCreateInput!, $update: TradeUpdateInput!) {
7210
7234
  upsertOneTrade(where: $where, create: $create, update: $update) {
7211
7235
  ${selectionSet}
@@ -14088,8 +14112,14 @@ exports.Trade = {
14088
14112
  * @returns The count of created records or null.
14089
14113
  */
14090
14114
  async updateMany(props, globalClient) {
14091
- const client = globalClient || client_1.client;
14092
- const UPDATE_MANY_TRADE = (0, client_1.gql) `
14115
+ const [modules, client] = await Promise.all([
14116
+ (0, client_1.getApolloModules)(),
14117
+ globalClient
14118
+ ? Promise.resolve(globalClient)
14119
+ : client_1.client
14120
+ ]);
14121
+ const { gql, ApolloError } = modules;
14122
+ const UPDATE_MANY_TRADE = gql `
14093
14123
  mutation updateManyTrade($data: [TradeCreateManyInput!]!) {
14094
14124
  updateManyTrade(data: $data) {
14095
14125
  count
@@ -19670,8 +19700,14 @@ exports.Trade = {
19670
19700
  * @returns The deleted Trade or null.
19671
19701
  */
19672
19702
  async delete(props, globalClient) {
19673
- const client = globalClient || client_1.client;
19674
- const DELETE_ONE_TRADE = (0, client_1.gql) `
19703
+ const [modules, client] = await Promise.all([
19704
+ (0, client_1.getApolloModules)(),
19705
+ globalClient
19706
+ ? Promise.resolve(globalClient)
19707
+ : client_1.client
19708
+ ]);
19709
+ const { gql, ApolloError } = modules;
19710
+ const DELETE_ONE_TRADE = gql `
19675
19711
  mutation deleteOneTrade($where: TradeWhereUniqueInput!) {
19676
19712
  deleteOneTrade(where: $where) {
19677
19713
  ${selectionSet}
@@ -19707,8 +19743,14 @@ exports.Trade = {
19707
19743
  */
19708
19744
  async get(props, globalClient) {
19709
19745
  var _a, _b;
19710
- const client = globalClient || client_1.client;
19711
- const GET_TRADE = (0, client_1.gql) `
19746
+ const [modules, client] = await Promise.all([
19747
+ (0, client_1.getApolloModules)(),
19748
+ globalClient
19749
+ ? Promise.resolve(globalClient)
19750
+ : client_1.client
19751
+ ]);
19752
+ const { gql, ApolloError } = modules;
19753
+ const GET_TRADE = gql `
19712
19754
  query getTrade($where: TradeWhereUniqueInput!) {
19713
19755
  getTrade(where: $where) {
19714
19756
  ${selectionSet}
@@ -19730,7 +19772,7 @@ exports.Trade = {
19730
19772
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getTrade) !== null && _b !== void 0 ? _b : null;
19731
19773
  }
19732
19774
  catch (error) {
19733
- if (error instanceof client_1.ApolloError && error.message === 'No Trade found') {
19775
+ if (error instanceof ApolloError && error.message === 'No Trade found') {
19734
19776
  return null;
19735
19777
  }
19736
19778
  else {
@@ -19746,8 +19788,14 @@ exports.Trade = {
19746
19788
  */
19747
19789
  async getAll(globalClient) {
19748
19790
  var _a, _b;
19749
- const client = globalClient || client_1.client;
19750
- const GET_ALL_TRADE = (0, client_1.gql) `
19791
+ const [modules, client] = await Promise.all([
19792
+ (0, client_1.getApolloModules)(),
19793
+ globalClient
19794
+ ? Promise.resolve(globalClient)
19795
+ : client_1.client
19796
+ ]);
19797
+ const { gql, ApolloError } = modules;
19798
+ const GET_ALL_TRADE = gql `
19751
19799
  query getAllTrade {
19752
19800
  trades {
19753
19801
  ${selectionSet}
@@ -19760,7 +19808,7 @@ exports.Trade = {
19760
19808
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.trades) !== null && _b !== void 0 ? _b : null;
19761
19809
  }
19762
19810
  catch (error) {
19763
- if (error instanceof client_1.ApolloError && error.message === 'No Trade found') {
19811
+ if (error instanceof ApolloError && error.message === 'No Trade found') {
19764
19812
  return null;
19765
19813
  }
19766
19814
  else {
@@ -19776,8 +19824,14 @@ exports.Trade = {
19776
19824
  * @returns An array of found Trade records or null.
19777
19825
  */
19778
19826
  async findMany(props, globalClient) {
19779
- const client = globalClient || client_1.client;
19780
- const FIND_MANY_TRADE = (0, client_1.gql) `
19827
+ const [modules, client] = await Promise.all([
19828
+ (0, client_1.getApolloModules)(),
19829
+ globalClient
19830
+ ? Promise.resolve(globalClient)
19831
+ : client_1.client
19832
+ ]);
19833
+ const { gql, ApolloError } = modules;
19834
+ const FIND_MANY_TRADE = gql `
19781
19835
  query findManyTrade($where: TradeWhereInput!) {
19782
19836
  trades(where: $where) {
19783
19837
  ${selectionSet}
@@ -19806,7 +19860,7 @@ exports.Trade = {
19806
19860
  }
19807
19861
  }
19808
19862
  catch (error) {
19809
- if (error instanceof client_1.ApolloError && error.message === 'No Trade found') {
19863
+ if (error instanceof ApolloError && error.message === 'No Trade found') {
19810
19864
  return null;
19811
19865
  }
19812
19866
  else {
package/User.cjs CHANGED
@@ -405,8 +405,14 @@ exports.User = {
405
405
  * @returns The created User or null.
406
406
  */
407
407
  async create(props, globalClient) {
408
- const client = globalClient || client_1.client;
409
- const CREATE_ONE_USER = (0, client_1.gql) `
408
+ const [modules, client] = await Promise.all([
409
+ (0, client_1.getApolloModules)(),
410
+ globalClient
411
+ ? Promise.resolve(globalClient)
412
+ : client_1.client
413
+ ]);
414
+ const { gql, ApolloError } = modules;
415
+ const CREATE_ONE_USER = gql `
410
416
  mutation createOneUser($data: UserCreateInput!) {
411
417
  createOneUser(data: $data) {
412
418
  ${selectionSet}
@@ -1071,8 +1077,14 @@ exports.User = {
1071
1077
  * @returns The count of created records or null.
1072
1078
  */
1073
1079
  async createMany(props, globalClient) {
1074
- const client = globalClient || client_1.client;
1075
- const CREATE_MANY_USER = (0, client_1.gql) `
1080
+ const [modules, client] = await Promise.all([
1081
+ (0, client_1.getApolloModules)(),
1082
+ globalClient
1083
+ ? Promise.resolve(globalClient)
1084
+ : client_1.client
1085
+ ]);
1086
+ const { gql, ApolloError } = modules;
1087
+ const CREATE_MANY_USER = gql `
1076
1088
  mutation createManyUser($data: [UserCreateManyInput!]!) {
1077
1089
  createManyUser(data: $data) {
1078
1090
  count
@@ -1118,8 +1130,14 @@ exports.User = {
1118
1130
  * @returns The updated User or null.
1119
1131
  */
1120
1132
  async update(props, globalClient) {
1121
- const client = globalClient || client_1.client;
1122
- const UPDATE_ONE_USER = (0, client_1.gql) `
1133
+ const [modules, client] = await Promise.all([
1134
+ (0, client_1.getApolloModules)(),
1135
+ globalClient
1136
+ ? Promise.resolve(globalClient)
1137
+ : client_1.client
1138
+ ]);
1139
+ const { gql, ApolloError } = modules;
1140
+ const UPDATE_ONE_USER = gql `
1123
1141
  mutation updateOneUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
1124
1142
  updateOneUser(data: $data, where: $where) {
1125
1143
  ${selectionSet}
@@ -3704,8 +3722,14 @@ exports.User = {
3704
3722
  * @returns The updated User or null.
3705
3723
  */
3706
3724
  async upsert(props, globalClient) {
3707
- const client = globalClient || client_1.client;
3708
- const UPSERT_ONE_USER = (0, client_1.gql) `
3725
+ const [modules, client] = await Promise.all([
3726
+ (0, client_1.getApolloModules)(),
3727
+ globalClient
3728
+ ? Promise.resolve(globalClient)
3729
+ : client_1.client
3730
+ ]);
3731
+ const { gql, ApolloError } = modules;
3732
+ const UPSERT_ONE_USER = gql `
3709
3733
  mutation upsertOneUser($where: UserWhereUniqueInput!, $create: UserCreateInput!, $update: UserUpdateInput!) {
3710
3734
  upsertOneUser(where: $where, create: $create, update: $update) {
3711
3735
  ${selectionSet}
@@ -6913,8 +6937,14 @@ exports.User = {
6913
6937
  * @returns The count of created records or null.
6914
6938
  */
6915
6939
  async updateMany(props, globalClient) {
6916
- const client = globalClient || client_1.client;
6917
- const UPDATE_MANY_USER = (0, client_1.gql) `
6940
+ const [modules, client] = await Promise.all([
6941
+ (0, client_1.getApolloModules)(),
6942
+ globalClient
6943
+ ? Promise.resolve(globalClient)
6944
+ : client_1.client
6945
+ ]);
6946
+ const { gql, ApolloError } = modules;
6947
+ const UPDATE_MANY_USER = gql `
6918
6948
  mutation updateManyUser($data: [UserCreateManyInput!]!) {
6919
6949
  updateManyUser(data: $data) {
6920
6950
  count
@@ -9499,8 +9529,14 @@ exports.User = {
9499
9529
  * @returns The deleted User or null.
9500
9530
  */
9501
9531
  async delete(props, globalClient) {
9502
- const client = globalClient || client_1.client;
9503
- const DELETE_ONE_USER = (0, client_1.gql) `
9532
+ const [modules, client] = await Promise.all([
9533
+ (0, client_1.getApolloModules)(),
9534
+ globalClient
9535
+ ? Promise.resolve(globalClient)
9536
+ : client_1.client
9537
+ ]);
9538
+ const { gql, ApolloError } = modules;
9539
+ const DELETE_ONE_USER = gql `
9504
9540
  mutation deleteOneUser($where: UserWhereUniqueInput!) {
9505
9541
  deleteOneUser(where: $where) {
9506
9542
  ${selectionSet}
@@ -9536,8 +9572,14 @@ exports.User = {
9536
9572
  */
9537
9573
  async get(props, globalClient) {
9538
9574
  var _a, _b;
9539
- const client = globalClient || client_1.client;
9540
- const GET_USER = (0, client_1.gql) `
9575
+ const [modules, client] = await Promise.all([
9576
+ (0, client_1.getApolloModules)(),
9577
+ globalClient
9578
+ ? Promise.resolve(globalClient)
9579
+ : client_1.client
9580
+ ]);
9581
+ const { gql, ApolloError } = modules;
9582
+ const GET_USER = gql `
9541
9583
  query getUser($where: UserWhereUniqueInput!) {
9542
9584
  getUser(where: $where) {
9543
9585
  ${selectionSet}
@@ -9560,7 +9602,7 @@ exports.User = {
9560
9602
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.getUser) !== null && _b !== void 0 ? _b : null;
9561
9603
  }
9562
9604
  catch (error) {
9563
- if (error instanceof client_1.ApolloError && error.message === 'No User found') {
9605
+ if (error instanceof ApolloError && error.message === 'No User found') {
9564
9606
  return null;
9565
9607
  }
9566
9608
  else {
@@ -9576,8 +9618,14 @@ exports.User = {
9576
9618
  */
9577
9619
  async getAll(globalClient) {
9578
9620
  var _a, _b;
9579
- const client = globalClient || client_1.client;
9580
- const GET_ALL_USER = (0, client_1.gql) `
9621
+ const [modules, client] = await Promise.all([
9622
+ (0, client_1.getApolloModules)(),
9623
+ globalClient
9624
+ ? Promise.resolve(globalClient)
9625
+ : client_1.client
9626
+ ]);
9627
+ const { gql, ApolloError } = modules;
9628
+ const GET_ALL_USER = gql `
9581
9629
  query getAllUser {
9582
9630
  users {
9583
9631
  ${selectionSet}
@@ -9590,7 +9638,7 @@ exports.User = {
9590
9638
  return (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.users) !== null && _b !== void 0 ? _b : null;
9591
9639
  }
9592
9640
  catch (error) {
9593
- if (error instanceof client_1.ApolloError && error.message === 'No User found') {
9641
+ if (error instanceof ApolloError && error.message === 'No User found') {
9594
9642
  return null;
9595
9643
  }
9596
9644
  else {
@@ -9606,8 +9654,14 @@ exports.User = {
9606
9654
  * @returns An array of found User records or null.
9607
9655
  */
9608
9656
  async findMany(props, globalClient) {
9609
- const client = globalClient || client_1.client;
9610
- const FIND_MANY_USER = (0, client_1.gql) `
9657
+ const [modules, client] = await Promise.all([
9658
+ (0, client_1.getApolloModules)(),
9659
+ globalClient
9660
+ ? Promise.resolve(globalClient)
9661
+ : client_1.client
9662
+ ]);
9663
+ const { gql, ApolloError } = modules;
9664
+ const FIND_MANY_USER = gql `
9611
9665
  query findManyUser($where: UserWhereInput!) {
9612
9666
  users(where: $where) {
9613
9667
  ${selectionSet}
@@ -9639,7 +9693,7 @@ exports.User = {
9639
9693
  }
9640
9694
  }
9641
9695
  catch (error) {
9642
- if (error instanceof client_1.ApolloError && error.message === 'No User found') {
9696
+ if (error instanceof ApolloError && error.message === 'No User found') {
9643
9697
  return null;
9644
9698
  }
9645
9699
  else {