> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galxe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi Dimensional Config

> Learn how to configure GraphQL Multi-Dimensional Credential

## Overview

GraphQL Multi-Dimensional Credential allows you to fetch user data via GraphQL APIs and validate eligibility across multiple dimensions. used to retrieve data for the extent of user participation.

<Tip>If you want to understand the workflow and considerations of GraphQL credentials, please refer to the [introduction](/quest/credential-api/graphql-cred/introduction)</Tip>

***

## Config process

### 1. Finding the Config in Task Settings

The option to configure GraphQL credential can be found in step 3, `Task Settings` of quest creation on the Galxe Dashboard, under the `Import Your Own Data` task type.

### 2. Basic Config

* **ID Type**

`ID Type` provides various identity options, including social accounts, blockchain addresses, and other unique identifiers.

* **Title**

Give your credential an enticing title.

* **Credential Source**

Choose `GraphQL` type

* **Type**

Choose `Multi Dimension`

### 3. Specify Dimensions

In Multi-Dimensional Credential configuration, you need to define specific dimensions to ensure each dimension is clearly identified and usable.

* **Identifier**:

  * Enter a unique identifier for the dimension, e.g., `mainnet_eth_balance`.

  * The identifier is used for internal calls and logic operations, and it must be globally unique.

* **Display Name**:

  * Enter a display name for the dimension, e.g., `ETH balance on Mainnet`.

  * This name will be displayed in the UI for user understanding.

* **Type**:

  * Select the dimension type `COUNTER` from the dropdown menu.

* **Description**:

  * Enter a description to explain the purpose of the dimension, e.g., "This dimension tracks the ETH balance of a user on Mainnet".

  * The description must be within 256 characters.

### 4. Configure API

* Input Endpoint Example:

```plaintext theme={null}
https://api.example.com/query
```

* Add Headers (Optional)

```json theme={null}
`access-token`: `YOUR_TOKEN`
```

* Input Query:

```graphql theme={null}
query info($address: String!) {
    tokenBalance(address: $address) {
    balance
    }
}
```

### 5. Test API Response

* **Input a test address and send the request to confirm the response**:
  ```json theme={null}
  {
    "balance": 100
  }
  ```

### 6. Write Expressions

* **Token Balance Output**:

```javascript theme={null}
  function(resp) {
      return {
        "mainnet_eth_balance": resp.balance
      };
  }
```

### 7. Description

Description of the certificate, supports rich text input, maximum 200 characters.

### 8. Call-to-Action Link

Guide users to specific operation pages to complete interactive tasks.

### 9. Participation End Time && Update Frequency (Optional)

* **Participation End Time**:

Control the time range of the credential, prohibiting new validations after the deadline.

* **Update Frequency**:

Remind users of the frequency of API data source updates, such as once a day or once every two days.

### 10. Config Rule

Configure rules in Quest to determine whether users meet the criteria.

* **Threshold Evaluation**:

<img height="200" src="https://mintcdn.com/galxe/z4ZJpHuDLJ6L2Gqf/images/cred/cred-rest-multi-1.gif?s=da016e91e06b83c55de774181cb8657e" data-path="images/cred/cred-rest-multi-1.gif" />

When a certain threshold condition is met (e.g., >0), assign a fixed points directly.

* **Multiple Entries(Optional)**:

<img height="200" src="https://mintcdn.com/galxe/z4ZJpHuDLJ6L2Gqf/images/cred/cred-rest-multi-2.gif?s=ab6c4a5689a12690ad397fd307fb27cd" data-path="images/cred/cred-rest-multi-2.gif" />

Enable users to claim rewards repeatedly once certain credentials are fulfilled, for example, a user earns 10 points for each 1 ETH they hold. If the user holds 5 ETH, they will earn 50 points.

***

## Example

### Galxe MSU Space points balance

* **Specify Dimensions**

Identifier:`points_balance`

Display Name:`points balance on msu`

Type:`COUNTER`

Description:`The balance of points you hold on msu`

* **Endpoint**

```plaintext theme={null}
https://graphigo-business.prd.galaxy.eco/query
```

* **Headers**

`No header`

* **Query**

```graphql theme={null}
  query info($address: String!) {
      space(id: 68267) {
          addressLoyaltyPoints(address: $address) {
          points
          }
      }
  }
```

* **Response**

```json theme={null}
  {
      "space": {
      "addressLoyaltyPoints": {
          "points": 100
      }
      }
  }
```

* **Expression**

```javascript theme={null}
function(resp) {
 try {
    let points = BigInt(resp.space.addressLoyaltyPoints.points);
    return { "points_balance": points };
 } catch (error) {
    return { "points_balance": 0 };
 }
}
```
