diff --git a/Gemfile.lock b/Gemfile.lock index 4819dcc1a06..1ebade60c40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -223,6 +223,7 @@ GEM faraday-rack (1.0.0) faraday-retry (1.0.3) ffi (1.15.5) + fiber-storage (1.0.0) formatador (1.1.0) globalid (1.2.1) activesupport (>= 6.1) @@ -268,8 +269,10 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) - graphql (2.0.11) - graphql-pagination (2.0.1) + graphql (2.3.14) + base64 + fiber-storage + graphql-pagination (2.2.0) graphql (~> 2.0) guard (2.18.1) formatador (>= 0.2.4) diff --git a/app/graphql/types/base_input_object.rb b/app/graphql/types/base_input_object.rb index 0eece52e8f0..74482b5f82b 100644 --- a/app/graphql/types/base_input_object.rb +++ b/app/graphql/types/base_input_object.rb @@ -10,7 +10,7 @@ def initialize(arguments, ruby_kwargs:, context:, defaults_used:) cleaned_kwargs = ruby_kwargs.dup self.class.arguments(context).each_value do |arg_defn| - next if arg_defn.permissions.blank? + next if arg_defn.try(:permissions).blank? if arg_defn.permissions.none? { |p| context.dig(:permissions, p) } cleaned_arguments.delete(arg_defn.keyword) diff --git a/schema.graphql b/schema.graphql index dc458a29516..8e307fe26d0 100644 --- a/schema.graphql +++ b/schema.graphql @@ -70,8 +70,18 @@ type AddOn { updatedAt: ISO8601DateTime! } +""" +AddOnCollection type +""" type AddOnCollection { + """ + A collection of paginated AddOnCollection + """ collection: [AddOn!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -139,8 +149,18 @@ type AnrokFeeObject { taxBreakdown: [AnrokBreakdownObject!] } +""" +AnrokFeeObjectCollection type +""" type AnrokFeeObjectCollection { + """ + A collection of paginated AnrokFeeObjectCollection + """ collection: [AnrokFeeObject!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -227,8 +247,18 @@ type BillableMetric { weightedInterval: WeightedIntervalEnum } +""" +BillableMetricCollection type +""" type BillableMetricCollection { + """ + A collection of paginated BillableMetricCollection + """ collection: [BillableMetric!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -356,15 +386,43 @@ type CollectionMapping { mappingType: MappingTypeEnum! } +""" +CollectionMappingCollection type +""" type CollectionMappingCollection { + """ + A collection of paginated CollectionMappingCollection + """ collection: [CollectionMapping!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } +""" +Type for CollectionMetadataType +""" type CollectionMetadata { + """ + Current Page of loaded data + """ currentPage: Int! + + """ + The number of items per page + """ limitValue: Int! + + """ + The total number of items to be paginated + """ totalCount: Int! + + """ + The total number of pages in the pagination + """ totalPages: Int! } @@ -1669,8 +1727,18 @@ type Coupon { updatedAt: ISO8601DateTime! } +""" +CouponCollection type +""" type CouponCollection { + """ + A collection of paginated CouponCollection + """ collection: [Coupon!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -2012,7 +2080,7 @@ input CreatePasswordResetInput { } """ -Autogenerated return type of CreatePasswordReset +Autogenerated return type of CreatePasswordReset. """ type CreatePasswordResetPayload { """ @@ -2149,8 +2217,18 @@ type CreditNoteAppliedTax implements AppliedTax { updatedAt: ISO8601DateTime! } +""" +CreditNoteCollection type +""" type CreditNoteCollection { + """ + A collection of paginated CreditNoteCollection + """ collection: [CreditNote!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3067,8 +3145,18 @@ input CustomerBillingConfigurationInput { documentLocale: String } +""" +CustomerCollection type +""" type CustomerCollection { + """ + A collection of paginated CustomerCollection + """ collection: [Customer!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3143,7 +3231,7 @@ input DestroyAddOnInput { } """ -Autogenerated return type of DestroyAddOn +Autogenerated return type of DestroyAddOn. """ type DestroyAddOnPayload { """ @@ -3165,7 +3253,7 @@ input DestroyAdjustedFeeInput { } """ -Autogenerated return type of DestroyAdjustedFee +Autogenerated return type of DestroyAdjustedFee. """ type DestroyAdjustedFeePayload { """ @@ -3187,7 +3275,7 @@ input DestroyBillableMetricInput { } """ -Autogenerated return type of DestroyBillableMetric +Autogenerated return type of DestroyBillableMetric. """ type DestroyBillableMetricPayload { """ @@ -3209,7 +3297,7 @@ input DestroyCouponInput { } """ -Autogenerated return type of DestroyCoupon +Autogenerated return type of DestroyCoupon. """ type DestroyCouponPayload { """ @@ -3231,7 +3319,7 @@ input DestroyCustomerInput { } """ -Autogenerated return type of DestroyCustomer +Autogenerated return type of DestroyCustomer. """ type DestroyCustomerPayload { """ @@ -3253,7 +3341,7 @@ input DestroyIntegrationCollectionMappingInput { } """ -Autogenerated return type of DestroyIntegrationCollectionMapping +Autogenerated return type of DestroyIntegrationCollectionMapping. """ type DestroyIntegrationCollectionMappingPayload { """ @@ -3286,7 +3374,7 @@ input DestroyIntegrationMappingInput { } """ -Autogenerated return type of DestroyIntegrationMapping +Autogenerated return type of DestroyIntegrationMapping. """ type DestroyIntegrationMappingPayload { """ @@ -3297,7 +3385,7 @@ type DestroyIntegrationMappingPayload { } """ -Autogenerated return type of DestroyIntegration +Autogenerated return type of DestroyIntegration. """ type DestroyIntegrationPayload { """ @@ -3319,7 +3407,7 @@ input DestroyPaymentProviderInput { } """ -Autogenerated return type of DestroyPaymentProvider +Autogenerated return type of DestroyPaymentProvider. """ type DestroyPaymentProviderPayload { """ @@ -3341,7 +3429,7 @@ input DestroyPlanInput { } """ -Autogenerated return type of DestroyPlan +Autogenerated return type of DestroyPlan. """ type DestroyPlanPayload { """ @@ -3363,7 +3451,7 @@ input DestroyTaxInput { } """ -Autogenerated return type of DestroyTax +Autogenerated return type of DestroyTax. """ type DestroyTaxPayload { """ @@ -3385,7 +3473,7 @@ input DestroyWebhookEndpointInput { } """ -Autogenerated return type of DestroyWebhookEndpoint +Autogenerated return type of DestroyWebhookEndpoint. """ type DestroyWebhookEndpointPayload { """ @@ -3483,8 +3571,18 @@ type Event { transactionId: String } +""" +EventCollection type +""" type EventCollection { + """ + A collection of paginated EventCollection + """ collection: [Event!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3674,8 +3772,18 @@ type FinalizedInvoiceCollection { paymentStatus: InvoicePaymentStatusTypeEnum } +""" +FinalizedInvoiceCollectionCollection type +""" type FinalizedInvoiceCollectionCollection { + """ + A collection of paginated FinalizedInvoiceCollectionCollection + """ collection: [FinalizedInvoiceCollection!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3691,7 +3799,7 @@ input GenerateCustomerPortalUrlInput { } """ -Autogenerated return type of GenerateCustomerPortalUrl +Autogenerated return type of GenerateCustomerPortalUrl. """ type GenerateCustomerPortalUrlPayload { """ @@ -3780,8 +3888,18 @@ type GrossRevenue { month: ISO8601DateTime! } +""" +GrossRevenueCollection type +""" type GrossRevenueCollection { + """ + A collection of paginated GrossRevenueCollection + """ collection: [GrossRevenue!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3796,17 +3914,27 @@ type GroupedChargeUsage { """ An ISO 8601-encoded date """ -scalar ISO8601Date +scalar ISO8601Date @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") """ An ISO 8601-encoded datetime """ -scalar ISO8601DateTime +scalar ISO8601DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") union Integration = AnrokIntegration | NetsuiteIntegration | OktaIntegration | XeroIntegration +""" +IntegrationCollection type +""" type IntegrationCollection { + """ + A collection of paginated IntegrationCollection + """ collection: [Integration!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3829,8 +3957,18 @@ type IntegrationItem { itemType: IntegrationItemTypeEnum! } +""" +IntegrationItemCollection type +""" type IntegrationItemCollection { + """ + A collection of paginated IntegrationItemCollection + """ collection: [IntegrationItem!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3860,8 +3998,18 @@ type Invite { token: String! } +""" +InviteCollection type +""" type InviteCollection { + """ + A collection of paginated InviteCollection + """ collection: [Invite!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -3932,8 +4080,18 @@ type InvoiceAppliedTax implements AppliedTax { updatedAt: ISO8601DateTime! } +""" +InvoiceCollection type +""" type InvoiceCollection { + """ + A collection of paginated InvoiceCollection + """ collection: [Invoice!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -4013,8 +4171,18 @@ type InvoicedUsage { month: ISO8601DateTime! } +""" +InvoicedUsageCollection type +""" type InvoicedUsageCollection { + """ + A collection of paginated InvoicedUsageCollection + """ collection: [InvoicedUsage!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -4071,8 +4239,18 @@ type Mapping { mappableType: MappableTypeEnum! } +""" +MappingCollection type +""" type MappingCollection { + """ + A collection of paginated MappingCollection + """ collection: [Mapping!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -4099,8 +4277,18 @@ type Membership { user: User! } +""" +MembershipCollection type +""" type MembershipCollection { + """ + A collection of paginated MembershipCollection + """ collection: [Membership!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: Metadata! } @@ -4115,11 +4303,30 @@ enum MembershipStatus { revoked } +""" +Type for CollectionMetadataType +""" type Metadata { adminCount: Int! + + """ + Current Page of loaded data + """ currentPage: Int! + + """ + The number of items per page + """ limitValue: Int! + + """ + The total number of items to be paginated + """ totalCount: Int! + + """ + The total number of pages in the pagination + """ totalPages: Int! } @@ -4129,8 +4336,18 @@ type Mrr { month: ISO8601DateTime! } +""" +MrrCollection type +""" type MrrCollection { + """ + A collection of paginated MrrCollection + """ collection: [Mrr!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -5245,15 +5462,35 @@ type OverdueBalance { month: ISO8601DateTime! } +""" +OverdueBalanceCollection type +""" type OverdueBalanceCollection { + """ + A collection of paginated OverdueBalanceCollection + """ collection: [OverdueBalance!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } union PaymentProvider = AdyenProvider | GocardlessProvider | StripeProvider +""" +PaymentProviderCollection type +""" type PaymentProviderCollection { + """ + A collection of paginated PaymentProviderCollection + """ collection: [PaymentProvider!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -5268,8 +5505,18 @@ type PaymentRequest { updatedAt: ISO8601DateTime! } +""" +PaymentRequestCollection type +""" type PaymentRequestCollection { + """ + A collection of paginated PaymentRequestCollection + """ collection: [PaymentRequest!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -5393,8 +5640,18 @@ type Plan { usageThresholds: [UsageThreshold!] } +""" +PlanCollection type +""" type PlanCollection { + """ + A collection of paginated PlanCollection + """ collection: [Plan!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -6103,8 +6360,18 @@ type Subscription { updatedAt: ISO8601DateTime! } +""" +SubscriptionCollection type +""" type SubscriptionCollection { + """ + A collection of paginated SubscriptionCollection + """ collection: [Subscription!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -6113,8 +6380,18 @@ type Subsidiary { externalName: String } +""" +SubsidiaryCollection type +""" type SubsidiaryCollection { + """ + A collection of paginated SubsidiaryCollection + """ collection: [Subsidiary!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -6130,7 +6407,7 @@ input SyncIntegrationCreditNoteInput { } """ -Autogenerated return type of SyncIntegrationCreditNote +Autogenerated return type of SyncIntegrationCreditNote. """ type SyncIntegrationCreditNotePayload { """ @@ -6152,7 +6429,7 @@ input SyncIntegrationInvoiceInput { } """ -Autogenerated return type of SyncIntegrationInvoice +Autogenerated return type of SyncIntegrationInvoice. """ type SyncIntegrationInvoicePayload { """ @@ -6194,8 +6471,18 @@ type Tax { updatedAt: ISO8601DateTime! } +""" +TaxCollection type +""" type TaxCollection { + """ + A collection of paginated TaxCollection + """ collection: [Tax!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -7465,8 +7752,18 @@ type Wallet { updatedAt: ISO8601DateTime! } +""" +WalletCollection type +""" type WalletCollection { + """ + A collection of paginated WalletCollection + """ collection: [Wallet!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -7489,8 +7786,18 @@ type WalletTransaction { wallet: Wallet } +""" +WalletTransactionCollection type +""" type WalletTransactionCollection { + """ + A collection of paginated WalletTransactionCollection + """ collection: [WalletTransaction!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -7527,8 +7834,18 @@ type Webhook { webhookType: String! } +""" +WebhookCollection type +""" type WebhookCollection { + """ + A collection of paginated WebhookCollection + """ collection: [Webhook!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } @@ -7541,8 +7858,18 @@ type WebhookEndpoint { webhookUrl: String! } +""" +WebhookEndpointCollection type +""" type WebhookEndpointCollection { + """ + A collection of paginated WebhookEndpointCollection + """ collection: [WebhookEndpoint!]! + + """ + Pagination Metadata for navigating the Pagination + """ metadata: CollectionMetadata! } diff --git a/schema.json b/schema.json index 23e8c1fe5f0..e9ecb9b912c 100644 --- a/schema.json +++ b/schema.json @@ -571,7 +571,7 @@ { "kind": "OBJECT", "name": "AddOnCollection", - "description": null, + "description": "AddOnCollection type", "interfaces": [ ], @@ -579,7 +579,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated AddOnCollection", "type": { "kind": "NON_NULL", "name": null, @@ -605,7 +605,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -1181,7 +1181,7 @@ { "kind": "OBJECT", "name": "AnrokFeeObjectCollection", - "description": null, + "description": "AnrokFeeObjectCollection type", "interfaces": [ ], @@ -1189,7 +1189,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated AnrokFeeObjectCollection", "type": { "kind": "NON_NULL", "name": null, @@ -1215,7 +1215,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -2268,7 +2268,7 @@ { "kind": "OBJECT", "name": "BillableMetricCollection", - "description": null, + "description": "BillableMetricCollection type", "interfaces": [ ], @@ -2276,7 +2276,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated BillableMetricCollection", "type": { "kind": "NON_NULL", "name": null, @@ -2302,7 +2302,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -3633,7 +3633,7 @@ { "kind": "OBJECT", "name": "CollectionMappingCollection", - "description": null, + "description": "CollectionMappingCollection type", "interfaces": [ ], @@ -3641,7 +3641,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated CollectionMappingCollection", "type": { "kind": "NON_NULL", "name": null, @@ -3667,7 +3667,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -3690,7 +3690,7 @@ { "kind": "OBJECT", "name": "CollectionMetadata", - "description": null, + "description": "Type for CollectionMetadataType", "interfaces": [ ], @@ -3698,7 +3698,7 @@ "fields": [ { "name": "currentPage", - "description": null, + "description": "Current Page of loaded data", "type": { "kind": "NON_NULL", "name": null, @@ -3716,7 +3716,7 @@ }, { "name": "limitValue", - "description": null, + "description": "The number of items per page", "type": { "kind": "NON_NULL", "name": null, @@ -3734,7 +3734,7 @@ }, { "name": "totalCount", - "description": null, + "description": "The total number of items to be paginated", "type": { "kind": "NON_NULL", "name": null, @@ -3752,7 +3752,7 @@ }, { "name": "totalPages", - "description": null, + "description": "The total number of pages in the pagination", "type": { "kind": "NON_NULL", "name": null, @@ -5950,7 +5950,7 @@ { "kind": "OBJECT", "name": "CouponCollection", - "description": null, + "description": "CouponCollection type", "interfaces": [ ], @@ -5958,7 +5958,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated CouponCollection", "type": { "kind": "NON_NULL", "name": null, @@ -5984,7 +5984,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -8351,7 +8351,7 @@ { "kind": "OBJECT", "name": "CreatePasswordResetPayload", - "description": "Autogenerated return type of CreatePasswordReset", + "description": "Autogenerated return type of CreatePasswordReset.", "interfaces": [ ], @@ -9756,7 +9756,7 @@ { "kind": "OBJECT", "name": "CreditNoteCollection", - "description": null, + "description": "CreditNoteCollection type", "interfaces": [ ], @@ -9764,7 +9764,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated CreditNoteCollection", "type": { "kind": "NON_NULL", "name": null, @@ -9790,7 +9790,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -12896,7 +12896,7 @@ { "kind": "OBJECT", "name": "CustomerCollection", - "description": null, + "description": "CustomerCollection type", "interfaces": [ ], @@ -12904,7 +12904,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated CustomerCollection", "type": { "kind": "NON_NULL", "name": null, @@ -12930,7 +12930,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -13605,7 +13605,7 @@ { "kind": "OBJECT", "name": "DestroyAddOnPayload", - "description": "Autogenerated return type of DestroyAddOn", + "description": "Autogenerated return type of DestroyAddOn.", "interfaces": [ ], @@ -13685,7 +13685,7 @@ { "kind": "OBJECT", "name": "DestroyAdjustedFeePayload", - "description": "Autogenerated return type of DestroyAdjustedFee", + "description": "Autogenerated return type of DestroyAdjustedFee.", "interfaces": [ ], @@ -13765,7 +13765,7 @@ { "kind": "OBJECT", "name": "DestroyBillableMetricPayload", - "description": "Autogenerated return type of DestroyBillableMetric", + "description": "Autogenerated return type of DestroyBillableMetric.", "interfaces": [ ], @@ -13845,7 +13845,7 @@ { "kind": "OBJECT", "name": "DestroyCouponPayload", - "description": "Autogenerated return type of DestroyCoupon", + "description": "Autogenerated return type of DestroyCoupon.", "interfaces": [ ], @@ -13925,7 +13925,7 @@ { "kind": "OBJECT", "name": "DestroyCustomerPayload", - "description": "Autogenerated return type of DestroyCustomer", + "description": "Autogenerated return type of DestroyCustomer.", "interfaces": [ ], @@ -14005,7 +14005,7 @@ { "kind": "OBJECT", "name": "DestroyIntegrationCollectionMappingPayload", - "description": "Autogenerated return type of DestroyIntegrationCollectionMapping", + "description": "Autogenerated return type of DestroyIntegrationCollectionMapping.", "interfaces": [ ], @@ -14124,7 +14124,7 @@ { "kind": "OBJECT", "name": "DestroyIntegrationMappingPayload", - "description": "Autogenerated return type of DestroyIntegrationMapping", + "description": "Autogenerated return type of DestroyIntegrationMapping.", "interfaces": [ ], @@ -14165,7 +14165,7 @@ { "kind": "OBJECT", "name": "DestroyIntegrationPayload", - "description": "Autogenerated return type of DestroyIntegration", + "description": "Autogenerated return type of DestroyIntegration.", "interfaces": [ ], @@ -14245,7 +14245,7 @@ { "kind": "OBJECT", "name": "DestroyPaymentProviderPayload", - "description": "Autogenerated return type of DestroyPaymentProvider", + "description": "Autogenerated return type of DestroyPaymentProvider.", "interfaces": [ ], @@ -14325,7 +14325,7 @@ { "kind": "OBJECT", "name": "DestroyPlanPayload", - "description": "Autogenerated return type of DestroyPlan", + "description": "Autogenerated return type of DestroyPlan.", "interfaces": [ ], @@ -14405,7 +14405,7 @@ { "kind": "OBJECT", "name": "DestroyTaxPayload", - "description": "Autogenerated return type of DestroyTax", + "description": "Autogenerated return type of DestroyTax.", "interfaces": [ ], @@ -14485,7 +14485,7 @@ { "kind": "OBJECT", "name": "DestroyWebhookEndpointPayload", - "description": "Autogenerated return type of DestroyWebhookEndpoint", + "description": "Autogenerated return type of DestroyWebhookEndpoint.", "interfaces": [ ], @@ -15068,7 +15068,7 @@ { "kind": "OBJECT", "name": "EventCollection", - "description": null, + "description": "EventCollection type", "interfaces": [ ], @@ -15076,7 +15076,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated EventCollection", "type": { "kind": "NON_NULL", "name": null, @@ -15102,7 +15102,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -16810,7 +16810,7 @@ { "kind": "OBJECT", "name": "FinalizedInvoiceCollectionCollection", - "description": null, + "description": "FinalizedInvoiceCollectionCollection type", "interfaces": [ ], @@ -16818,7 +16818,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated FinalizedInvoiceCollectionCollection", "type": { "kind": "NON_NULL", "name": null, @@ -16844,7 +16844,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -16916,7 +16916,7 @@ { "kind": "OBJECT", "name": "GenerateCustomerPortalUrlPayload", - "description": "Autogenerated return type of GenerateCustomerPortalUrl", + "description": "Autogenerated return type of GenerateCustomerPortalUrl.", "interfaces": [ ], @@ -17600,7 +17600,7 @@ { "kind": "OBJECT", "name": "GrossRevenueCollection", - "description": null, + "description": "GrossRevenueCollection type", "interfaces": [ ], @@ -17608,7 +17608,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated GrossRevenueCollection", "type": { "kind": "NON_NULL", "name": null, @@ -17634,7 +17634,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -17831,7 +17831,7 @@ { "kind": "OBJECT", "name": "IntegrationCollection", - "description": null, + "description": "IntegrationCollection type", "interfaces": [ ], @@ -17839,7 +17839,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated IntegrationCollection", "type": { "kind": "NON_NULL", "name": null, @@ -17865,7 +17865,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -18096,7 +18096,7 @@ { "kind": "OBJECT", "name": "IntegrationItemCollection", - "description": null, + "description": "IntegrationItemCollection type", "interfaces": [ ], @@ -18104,7 +18104,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated IntegrationItemCollection", "type": { "kind": "NON_NULL", "name": null, @@ -18130,7 +18130,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -18398,7 +18398,7 @@ { "kind": "OBJECT", "name": "InviteCollection", - "description": null, + "description": "InviteCollection type", "interfaces": [ ], @@ -18406,7 +18406,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated InviteCollection", "type": { "kind": "NON_NULL", "name": null, @@ -18432,7 +18432,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -19458,7 +19458,7 @@ { "kind": "OBJECT", "name": "InvoiceCollection", - "description": null, + "description": "InvoiceCollection type", "interfaces": [ ], @@ -19466,7 +19466,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated InvoiceCollection", "type": { "kind": "NON_NULL", "name": null, @@ -19492,7 +19492,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -20201,7 +20201,7 @@ { "kind": "OBJECT", "name": "InvoicedUsageCollection", - "description": null, + "description": "InvoicedUsageCollection type", "interfaces": [ ], @@ -20209,7 +20209,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated InvoicedUsageCollection", "type": { "kind": "NON_NULL", "name": null, @@ -20235,7 +20235,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -20616,7 +20616,7 @@ { "kind": "OBJECT", "name": "MappingCollection", - "description": null, + "description": "MappingCollection type", "interfaces": [ ], @@ -20624,7 +20624,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated MappingCollection", "type": { "kind": "NON_NULL", "name": null, @@ -20650,7 +20650,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -20907,7 +20907,7 @@ { "kind": "OBJECT", "name": "MembershipCollection", - "description": null, + "description": "MembershipCollection type", "interfaces": [ ], @@ -20915,7 +20915,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated MembershipCollection", "type": { "kind": "NON_NULL", "name": null, @@ -20941,7 +20941,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -21016,7 +21016,7 @@ { "kind": "OBJECT", "name": "Metadata", - "description": null, + "description": "Type for CollectionMetadataType", "interfaces": [ ], @@ -21042,7 +21042,7 @@ }, { "name": "currentPage", - "description": null, + "description": "Current Page of loaded data", "type": { "kind": "NON_NULL", "name": null, @@ -21060,7 +21060,7 @@ }, { "name": "limitValue", - "description": null, + "description": "The number of items per page", "type": { "kind": "NON_NULL", "name": null, @@ -21078,7 +21078,7 @@ }, { "name": "totalCount", - "description": null, + "description": "The total number of items to be paginated", "type": { "kind": "NON_NULL", "name": null, @@ -21096,7 +21096,7 @@ }, { "name": "totalPages", - "description": null, + "description": "The total number of pages in the pagination", "type": { "kind": "NON_NULL", "name": null, @@ -21178,7 +21178,7 @@ { "kind": "OBJECT", "name": "MrrCollection", - "description": null, + "description": "MrrCollection type", "interfaces": [ ], @@ -21186,7 +21186,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated MrrCollection", "type": { "kind": "NON_NULL", "name": null, @@ -21212,7 +21212,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -25181,7 +25181,7 @@ { "kind": "OBJECT", "name": "OverdueBalanceCollection", - "description": null, + "description": "OverdueBalanceCollection type", "interfaces": [ ], @@ -25189,7 +25189,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated OverdueBalanceCollection", "type": { "kind": "NON_NULL", "name": null, @@ -25215,7 +25215,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -25264,7 +25264,7 @@ { "kind": "OBJECT", "name": "PaymentProviderCollection", - "description": null, + "description": "PaymentProviderCollection type", "interfaces": [ ], @@ -25272,7 +25272,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated PaymentProviderCollection", "type": { "kind": "NON_NULL", "name": null, @@ -25298,7 +25298,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -25486,7 +25486,7 @@ { "kind": "OBJECT", "name": "PaymentRequestCollection", - "description": null, + "description": "PaymentRequestCollection type", "interfaces": [ ], @@ -25494,7 +25494,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated PaymentRequestCollection", "type": { "kind": "NON_NULL", "name": null, @@ -25520,7 +25520,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -27244,7 +27244,7 @@ { "kind": "OBJECT", "name": "PlanCollection", - "description": null, + "description": "PlanCollection type", "interfaces": [ ], @@ -27252,7 +27252,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated PlanCollection", "type": { "kind": "NON_NULL", "name": null, @@ -27278,7 +27278,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -32259,7 +32259,7 @@ { "kind": "OBJECT", "name": "SubscriptionCollection", - "description": null, + "description": "SubscriptionCollection type", "interfaces": [ ], @@ -32267,7 +32267,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated SubscriptionCollection", "type": { "kind": "NON_NULL", "name": null, @@ -32293,7 +32293,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -32361,7 +32361,7 @@ { "kind": "OBJECT", "name": "SubsidiaryCollection", - "description": null, + "description": "SubsidiaryCollection type", "interfaces": [ ], @@ -32369,7 +32369,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated SubsidiaryCollection", "type": { "kind": "NON_NULL", "name": null, @@ -32395,7 +32395,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -32457,7 +32457,7 @@ { "kind": "OBJECT", "name": "SyncIntegrationCreditNotePayload", - "description": "Autogenerated return type of SyncIntegrationCreditNote", + "description": "Autogenerated return type of SyncIntegrationCreditNote.", "interfaces": [ ], @@ -32537,7 +32537,7 @@ { "kind": "OBJECT", "name": "SyncIntegrationInvoicePayload", - "description": "Autogenerated return type of SyncIntegrationInvoice", + "description": "Autogenerated return type of SyncIntegrationInvoice.", "interfaces": [ ], @@ -32835,7 +32835,7 @@ { "kind": "OBJECT", "name": "TaxCollection", - "description": null, + "description": "TaxCollection type", "interfaces": [ ], @@ -32843,7 +32843,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated TaxCollection", "type": { "kind": "NON_NULL", "name": null, @@ -32869,7 +32869,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -37995,7 +37995,7 @@ { "kind": "OBJECT", "name": "WalletCollection", - "description": null, + "description": "WalletCollection type", "interfaces": [ ], @@ -38003,7 +38003,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated WalletCollection", "type": { "kind": "NON_NULL", "name": null, @@ -38029,7 +38029,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -38278,7 +38278,7 @@ { "kind": "OBJECT", "name": "WalletTransactionCollection", - "description": null, + "description": "WalletTransactionCollection type", "interfaces": [ ], @@ -38286,7 +38286,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated WalletTransactionCollection", "type": { "kind": "NON_NULL", "name": null, @@ -38312,7 +38312,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -38643,7 +38643,7 @@ { "kind": "OBJECT", "name": "WebhookCollection", - "description": null, + "description": "WebhookCollection type", "interfaces": [ ], @@ -38651,7 +38651,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated WebhookCollection", "type": { "kind": "NON_NULL", "name": null, @@ -38677,7 +38677,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -38813,7 +38813,7 @@ { "kind": "OBJECT", "name": "WebhookEndpointCollection", - "description": null, + "description": "WebhookEndpointCollection type", "interfaces": [ ], @@ -38821,7 +38821,7 @@ "fields": [ { "name": "collection", - "description": null, + "description": "A collection of paginated WebhookEndpointCollection", "type": { "kind": "NON_NULL", "name": null, @@ -38847,7 +38847,7 @@ }, { "name": "metadata", - "description": null, + "description": "Pagination Metadata for navigating the Pagination", "type": { "kind": "NON_NULL", "name": null, @@ -40184,6 +40184,24 @@ ] }, + { + "name": "isOneOf", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null, + "args": [ + + ] + }, { "name": "kind", "description": null, @@ -40331,6 +40349,30 @@ } ], "directives": [ + { + "name": "deprecated", + "description": "Marks an element of a GraphQL schema as no longer supported.", + "locations": [ + "FIELD_DEFINITION", + "ENUM_VALUE", + "ARGUMENT_DEFINITION", + "INPUT_FIELD_DEFINITION" + ], + "args": [ + { + "name": "reason", + "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"No longer supported\"", + "isDeprecated": false, + "deprecationReason": null + } + ] + }, { "name": "include", "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", @@ -40358,6 +40400,16 @@ } ] }, + { + "name": "oneOf", + "description": "Requires that exactly one field must be supplied and that field must not be `null`.", + "locations": [ + "INPUT_OBJECT" + ], + "args": [ + + ] + }, { "name": "skip", "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", @@ -40386,24 +40438,25 @@ ] }, { - "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", + "name": "specifiedBy", + "description": "Exposes a URL that specifies the behavior of this scalar.", "locations": [ - "FIELD_DEFINITION", - "ENUM_VALUE", - "ARGUMENT_DEFINITION", - "INPUT_FIELD_DEFINITION" + "SCALAR" ], "args": [ { - "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).", + "name": "url", + "description": "The URL that specifies the behavior of this scalar.", "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": "\"No longer supported\"", + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } diff --git a/spec/graphql/resolvers/analytics/gross_revenues_resolver_spec.rb b/spec/graphql/resolvers/analytics/gross_revenues_resolver_spec.rb index 64dcfd4f1c0..e6144367b80 100644 --- a/spec/graphql/resolvers/analytics/gross_revenues_resolver_spec.rb +++ b/spec/graphql/resolvers/analytics/gross_revenues_resolver_spec.rb @@ -36,22 +36,4 @@ expect(result['data']['grossRevenues']['collection']).to eq([]) end - - describe '#resolve' do - subject(:resolve) { resolver.resolve } - - let(:resolver) { described_class.new(object: nil, context: nil, field: nil) } - let(:current_organization) { create(:organization) } - - before do - allow(Analytics::GrossRevenue).to receive(:find_all_by).and_return([]) - allow(resolver).to receive(:current_organization).and_return(current_organization) - - resolve - end - - it 'calls ::Analytics::GrossRevenue.find_all_by' do - expect(Analytics::GrossRevenue).to have_received(:find_all_by).with(current_organization.id, months: 12) - end - end end diff --git a/spec/graphql/resolvers/analytics/invoice_collections_resolver_spec.rb b/spec/graphql/resolvers/analytics/invoice_collections_resolver_spec.rb index 3b9ba752a30..9c3ecfbf9a8 100644 --- a/spec/graphql/resolvers/analytics/invoice_collections_resolver_spec.rb +++ b/spec/graphql/resolvers/analytics/invoice_collections_resolver_spec.rb @@ -62,23 +62,5 @@ expect(invoice_collections_response['collection'].first['invoicesCount']).to eq('0') end end - - describe '#resolve' do - subject(:resolve) { resolver.resolve } - - let(:resolver) { described_class.new(object: nil, context: nil, field: nil) } - let(:current_organization) { create(:organization) } - - before do - allow(Analytics::InvoiceCollection).to receive(:find_all_by).and_return([]) - allow(resolver).to receive(:current_organization).and_return(current_organization) - - resolve - end - - it 'calls ::Analytics::InvoiceCollection.find_all_by' do - expect(Analytics::InvoiceCollection).to have_received(:find_all_by).with(current_organization.id, months: 12) - end - end end end diff --git a/spec/graphql/resolvers/analytics/invoiced_usages_resolver_spec.rb b/spec/graphql/resolvers/analytics/invoiced_usages_resolver_spec.rb index 505e47056b8..bcb79127a9a 100644 --- a/spec/graphql/resolvers/analytics/invoiced_usages_resolver_spec.rb +++ b/spec/graphql/resolvers/analytics/invoiced_usages_resolver_spec.rb @@ -54,23 +54,5 @@ expect(result['data']['invoicedUsages']['collection']).to eq([]) end - - describe '#resolve' do - subject(:resolve) { resolver.resolve } - - let(:resolver) { described_class.new(object: nil, context: nil, field: nil) } - let(:current_organization) { create(:organization) } - - before do - allow(Analytics::InvoicedUsage).to receive(:find_all_by).and_return([]) - allow(resolver).to receive(:current_organization).and_return(current_organization) - - resolve - end - - it 'calls ::Analytics::InvoicedUsage.find_all_by' do - expect(Analytics::InvoicedUsage).to have_received(:find_all_by).with(current_organization.id, months: 12) - end - end end end diff --git a/spec/graphql/resolvers/analytics/mrrs_resolver_spec.rb b/spec/graphql/resolvers/analytics/mrrs_resolver_spec.rb index f63772dfdaf..353b5f106f1 100644 --- a/spec/graphql/resolvers/analytics/mrrs_resolver_spec.rb +++ b/spec/graphql/resolvers/analytics/mrrs_resolver_spec.rb @@ -61,23 +61,5 @@ expect(mrrs_response['collection'].first['currency']).to eq(nil) end end - - describe '#resolve' do - subject(:resolve) { resolver.resolve } - - let(:resolver) { described_class.new(object: nil, context: nil, field: nil) } - let(:current_organization) { create(:organization) } - - before do - allow(Analytics::Mrr).to receive(:find_all_by).and_return([]) - allow(resolver).to receive(:current_organization).and_return(current_organization) - - resolve - end - - it 'calls ::Analytics::Mrr.find_all_by' do - expect(Analytics::Mrr).to have_received(:find_all_by).with(current_organization.id, months: 12) - end - end end end diff --git a/spec/graphql/resolvers/analytics/overdue_balances_resolver_spec.rb b/spec/graphql/resolvers/analytics/overdue_balances_resolver_spec.rb index f0ba57ec9ea..00b132a7801 100644 --- a/spec/graphql/resolvers/analytics/overdue_balances_resolver_spec.rb +++ b/spec/graphql/resolvers/analytics/overdue_balances_resolver_spec.rb @@ -36,22 +36,4 @@ expect(result['data']['overdueBalances']['collection']).to eq([]) end - - describe '#resolve' do - subject(:resolve) { resolver.resolve } - - let(:resolver) { described_class.new(object: nil, context: nil, field: nil) } - let(:current_organization) { create(:organization) } - - before do - allow(Analytics::OverdueBalance).to receive(:find_all_by).and_return([]) - allow(resolver).to receive(:current_organization).and_return(current_organization) - - resolve - end - - it 'calls ::Analytics::OverdueBalance.find_all_by' do - expect(Analytics::OverdueBalance).to have_received(:find_all_by).with(current_organization.id) - end - end end