Skip to main content

createSampleOrganization

talawa-apiDocs


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:

  1. Verifies that the current user exists and is fetched from the cache or database.
  2. Checks if the current user has a valid application profile and whether they are authorized.
  3. Ensures that the current user is a super admin.
  4. 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.

Remarks

This function is intended for creating sample data and should only be accessible by super admins.

Defined in

src/resolvers/Mutation/createSampleOrganization.ts:33