-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace ortto External Embedded Webform for Onboarding guide #1657
Changes from 4 commits
ce5dd10
50d2563
18dc52d
5f8f952
685ac4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Arg, Query, Resolver } from 'type-graphql'; | ||
import { getNotificationAdapter } from '../adapters/adaptersFactory'; | ||
import { logger } from '../utils/logger'; | ||
|
||
@Resolver() | ||
export class OnboardingFormResolver { | ||
@Query(_returns => Boolean) | ||
async subscribeOnboarding(@Arg('email') email: string): Promise<boolean> { | ||
try { | ||
await getNotificationAdapter().subscribeOnboarding({ email }); | ||
return true; | ||
} catch (e) { | ||
logger.debug('subscribeOnboarding() error', e); | ||
return false; | ||
Meriem-BM marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -20,6 +20,7 @@ import { ProjectUserInstantPowerViewResolver } from './instantPowerResolver'; | |||||
import { AnchorContractAddressResolver } from './anchorContractAddressResolver'; | ||||||
import { RecurringDonationResolver } from './recurringDonationResolver'; | ||||||
import { DraftDonationResolver } from './draftDonationResolver'; | ||||||
import { OnboardingFormResolver } from './onboardingFormResolver'; | ||||||
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types | ||||||
export const getResolvers = (): Function[] => { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace the generic The use of - export const getResolvers = (): Function[] => {
+ export const getResolvers = (): Array<() => any> => { // Adjust the return type based on actual resolver function signatures. Committable suggestion
Suggested change
ToolsBiome
|
||||||
|
@@ -49,5 +50,6 @@ export const getResolvers = (): Function[] => { | |||||
|
||||||
AnchorContractAddressResolver, | ||||||
RecurringDonationResolver, | ||||||
OnboardingFormResolver, | ||||||
]; | ||||||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the decorator usage.
The static analysis tool flagged an error with the decorator usage on the method parameter. This needs to be corrected to ensure proper functionality.
Committable suggestion
Tools
Biome