Skip to content

First steps with datacat: Admin

SeeRoSee edited this page Jan 21, 2022 · 2 revisions

User administration

The hamburger menu in the upper left corner can be used to access the "GraphiQL Interface". Queries can be submitted to the GraphQL database via the input interface on the left side. In the right window the corresponding answer of the database is displayed.

Find user

If the user with the given username exists, it will be displayed with its associated status.

{
    findAccounts(input: {query: "username"}) {
        nodes {
            username
            status
        }
    }
}

Assign user role

By setting the status to "Verfified" the user is assigned the role "USER".

mutation {
  updateAccountStatus(input: {
    username: "test
    status: Verified
  }) {
    username
    status
  }
}

Block user

Locking a user prevents him from logging in and editing the catalog.

mutation {
  lockAccount(username: "username") {
    username
    locked
  }
}

Unlock user

mutation {
  unlockAccount(username: "username") {
    username
    locked
  }
}

Delete user

This action is not undoable!

mutation {
  deleteAccount(username: "username") {
    username
  }
}

Database queries

Some examples are shown below. The complete list of queries can be found in the "docs" (upper right corner) or here.

Hierarchy

Returns all elements of the database. Filtering by element type is possible.

{
    hierarchy(input: {rootNodeFilter: {idNotIn: ""}}) {
        nodes {
          	name
          	createdBy
          	created
           	lastModified
          	recordType
          	description
        }
    }
}

Class query

Query a class by ID.

{
    findSubjects(input: {idIn: "14592ed2-2008-4eab-9dee-2c592cc72df0"}) {
        nodes {
          	id
          	name
          	createdBy
          	created
           	lastModified
          	recordType
          	description
        }
    }
}

Check routines

Query faulty catalog elements. Check routines always start with the "Find" prefix. Here: Output of all Properties that are neither assigned to a Property group nor to a class. For more info click here.

{
  FindPropWithoutSubjectOrPropGroup(input: {rootNodeFilter: {}}) {
    nodes {
      name
      description
      createdBy
      recordType
    }
  }
}