feat: add GetPaymentPlans graphQL query
This commit is contained in:
10
packages/backend/src/graphql/queries/get-payment-plans.ee.ts
Normal file
10
packages/backend/src/graphql/queries/get-payment-plans.ee.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import appConfig from '../../config/app';
|
||||
import Billing from '../../helpers/billing/index.ee';
|
||||
|
||||
const getPaymentPlans = async () => {
|
||||
if (!appConfig.isCloud) return;
|
||||
|
||||
return Billing.paddlePlans;
|
||||
};
|
||||
|
||||
export default getPaymentPlans;
|
@@ -12,6 +12,7 @@ import getDynamicData from './queries/get-dynamic-data';
|
||||
import getDynamicFields from './queries/get-dynamic-fields';
|
||||
import getCurrentUser from './queries/get-current-user';
|
||||
import getUsageData from './queries/get-usage-data.ee';
|
||||
import getPaymentPlans from './queries/get-payment-plans.ee';
|
||||
import getPaymentPortalUrl from './queries/get-payment-portal-url.ee';
|
||||
import getAutomatischInfo from './queries/get-automatisch-info';
|
||||
import healthcheck from './queries/healthcheck';
|
||||
@@ -31,6 +32,7 @@ const queryResolvers = {
|
||||
getDynamicFields,
|
||||
getCurrentUser,
|
||||
getUsageData,
|
||||
getPaymentPlans,
|
||||
getPaymentPortalUrl,
|
||||
getAutomatischInfo,
|
||||
healthcheck,
|
||||
|
@@ -36,6 +36,7 @@ type Query {
|
||||
getCurrentUser: User
|
||||
getUsageData: GetUsageData
|
||||
getPaymentPortalUrl: GetPaymentPortalUrl
|
||||
getPaymentPlans: [PaymentPlan]
|
||||
getAutomatischInfo: GetAutomatischInfo
|
||||
healthcheck: AppHealth
|
||||
}
|
||||
@@ -481,6 +482,13 @@ type GetPaymentPortalUrl {
|
||||
url: String
|
||||
}
|
||||
|
||||
type PaymentPlan {
|
||||
name: String
|
||||
limit: String
|
||||
price: String
|
||||
productId: String
|
||||
}
|
||||
|
||||
schema {
|
||||
query: Query
|
||||
mutation: Mutation
|
||||
|
Reference in New Issue
Block a user