createOrgByUser

This mutation allows the creation of a new organization by an authorized user.

Sample Mutation

Create a marketplace that has a name of metaverse:

mutation{
  createOrgByUser(name: "metaverse" handle: "metaverse"){
    id
    userId
  }
}

Sample Response

{
  "data": {
    "createOrgByUser": {
      "id": "cdf77bbe-1e6b-4245-8f48-6de83afba2a8",
      "userId": "e1836faf-3c5c-4470-9096-24c6c4f4d400"
    }
  }
}

Result

544

Arguments

Name

Type

Description

Required

name

String

The name of the organization.

Yes

handle

String

The nickname of the organization.

Yes

Returns

Name

Type

Description

UserOrganization

Object

Contains all the information from UserOrganization such as the user organization ID, user ID, user, username, settings, etc.

Example

Create an organization with a defined name and handle: