Add createCustomerPortalSession #238

Merged
loewy merged 2 commits from loewy/create-customer-portal-session into master 2026-05-01 22:45:40 +00:00
3 changed files with 6 additions and 13 deletions
Showing only changes of commit 20f50368c9 - Show all commits

View File

@@ -2457,10 +2457,6 @@ export type MutationCreateChallengeArgs = {
startDate: Scalars["DateTime"]["input"]; startDate: Scalars["DateTime"]["input"];
}; };
export type MutationCreateCustomerPortalSessionArgs = {
returnUrl?: InputMaybe<Scalars["String"]["input"]>;
};
export type MutationCreateRuleSetArgs = { export type MutationCreateRuleSetArgs = {
description?: InputMaybe<Scalars["String"]["input"]>; description?: InputMaybe<Scalars["String"]["input"]>;
name: Scalars["String"]["input"]; name: Scalars["String"]["input"];
@@ -4712,7 +4708,7 @@ export type CreateSubscriptionMutation = {
}; };
export type CreateCustomerPortalSessionMutationVariables = Exact<{ export type CreateCustomerPortalSessionMutationVariables = Exact<{
returnUrl?: InputMaybe<Scalars["String"]["input"]>; [key: string]: never;
}>; }>;
export type CreateCustomerPortalSessionMutation = { export type CreateCustomerPortalSessionMutation = {
@@ -9612,8 +9608,8 @@ export type CreateSubscriptionMutationOptions = Apollo.BaseMutationOptions<
CreateSubscriptionMutationVariables CreateSubscriptionMutationVariables
>; >;
export const CreateCustomerPortalSessionDocument = gql` export const CreateCustomerPortalSessionDocument = gql`
mutation CreateCustomerPortalSession($returnUrl: String) { mutation CreateCustomerPortalSession {
createCustomerPortalSession(returnUrl: $returnUrl) { createCustomerPortalSession {
portalUrl portalUrl
} }
} }
@@ -9636,7 +9632,6 @@ export type CreateCustomerPortalSessionMutationFn = Apollo.MutationFunction<
* @example * @example
* const [createCustomerPortalSessionMutation, { data, loading, error }] = useCreateCustomerPortalSessionMutation({ * const [createCustomerPortalSessionMutation, { data, loading, error }] = useCreateCustomerPortalSessionMutation({
* variables: { * variables: {
* returnUrl: // value for 'returnUrl'
* }, * },
* }); * });
*/ */

View File

@@ -20,8 +20,8 @@ mutation CreateSubscription($priceId: String!) {
} }
} }
mutation CreateCustomerPortalSession($returnUrl: String) { mutation CreateCustomerPortalSession {
createCustomerPortalSession(returnUrl: $returnUrl) { createCustomerPortalSession {
portalUrl portalUrl
} }
} }

View File

@@ -1117,9 +1117,7 @@ type Mutation {
ensureStripeCustomerExists: UserGQL! ensureStripeCustomerExists: UserGQL!
deleteUser: Boolean! deleteUser: Boolean!
createSubscription(priceId: String!): CreateSubscriptionResultGQL! createSubscription(priceId: String!): CreateSubscriptionResultGQL!
createCustomerPortalSession( createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
returnUrl: String = null
): CreateCustomerPortalSessionResultGQL!
cancelSubscription: UserSubscriptionStatusGQL! cancelSubscription: UserSubscriptionStatusGQL!
grantManualEntitlement( grantManualEntitlement(
userId: Int! userId: Int!