> ## 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.

# Single Dimensional Config

> Learn how to configure GraphQL Single-Dimensional Credential

## Overview

GraphQL Single-Dimensional Credential allows you to fetch user data via GraphQL APIs and validate user eligibility based on a single condition. It is suitable for  when task verification is equivalent to answering the question, *Did this particular user perform this task — yes or no?*

<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 `Single Dimension`

### 3. 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
    }
}
```

### 4. Test API Response

* Input a test address, send the request, and confirm whether the response is correct.

* The response must be in JSON format. Example:

```json theme={null}
    {
        "balance":100
    }
```

### 5. Write Expressions

1. **Points balance validation**:

```javascript theme={null}
   function(resp) {
       return resp.balance >= 100 ? 1 : 0;
   }
```

### 6. Description

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

### 7. Call-to-Action Link

Guide users to specific operation pages to complete interactive tasks.

### 8. 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.

***

## Example

### Galxe MSU Space requires holding at least 100 points

* **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) {
    return resp.space.addressLoyaltyPoints >= 100 ? 1 : 0;
}
```
