createSampleOrganization
talawa-api / resolvers/Mutation/createSampleOrganization / createSampleOrganization
Variable: createSampleOrganization
> const
createSampleOrganization: MutationResolvers
["createSampleOrganization"
]
Generates sample data for testing or development purposes.
This resolver performs the following steps:
- Verifies that the current user exists and is fetched from the cache or database.
- Checks if the current user has a valid application profile and whether they are authorized.
- Ensures that the current user is a super admin.
- Utilizes a utility function to create a sample organization.
Param
The parent object, not used in this resolver.
Param
The arguments for the mutation, not used in this resolver.
Param
The context object, including the user ID and other necessary context for authorization.
Returns
True if the sample data generation is successful; false otherwise.
Remarks
This function is intended for creating sample data and should only be accessible by super admins.