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

# Using the IDE

> Explore the Fibery GraphQL schema in the built-in IDE.

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.

The good news is that Fibery GraphQL IDE can be used by non-tech users to retrieve and modify the database records in a quick and simple way since it has autocomplete and easy to understand language.

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/89464f34-ab3a-4dc5-8c3d-62c882cdeef9.gif?s=1fb0124e634fe184b2f6f386c6ef2808" alt="2022-07-22 11.11.43.gif" width="2112" height="1490" data-path="images/89464f34-ab3a-4dc5-8c3d-62c882cdeef9.gif" />

## How to start

Every space has separate GraphQL API endpoint. The list of available space API endpoints can be found by following the link: `{your fibery host}/api/graphql`

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/f75ca50f-0cba-4c8a-b1f2-fc3ce044ae13.png?fit=max&auto=format&n=lUFkgk4SW9_Hi0iL&q=85&s=9ab87528131b8e78921468b66e5b53d3" alt="image.png" width="1636" height="1200" data-path="images/f75ca50f-0cba-4c8a-b1f2-fc3ce044ae13.png" />

By opening space's end-point in your browser you will find a graphical interactive in-browser GraphQL IDE. Here you can explorer space's GraphQL documentation and execute your GraphQL queries.

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/ecb9653d-aa57-47a3-b349-45d9bc6e2d52.gif?s=771763d15df4135fd780728e1e241986" alt="g-explorer.gif" width="2110" height="1448" data-path="images/ecb9653d-aa57-47a3-b349-45d9bc6e2d52.gif" />

Now you are ready to find records in your database.

## How to find database records

The records can be queried using query which starts from `find`

For example:

```graphql theme={null}
{
  findBugs(name: {contains: "first"}) {
    id
    name
    state {
      name
    }
    assignees {
      name
    }
  }
}
```

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/472f0b50-1815-48d6-b4c7-0e2d11d68478.png?fit=max&auto=format&n=lUFkgk4SW9_Hi0iL&q=85&s=2c8a72dc052fe3a87db9e5560261f50c" alt="image.png" width="1380" height="710" data-path="images/472f0b50-1815-48d6-b4c7-0e2d11d68478.png" />

Read more about queries including sorting and paging in [GraphQL queries](/guides/graphql/queries).

## How to modify or create database records

There are multiple operations available for modifying database records. These operations can be performed for found entities by provided filter or for created records in corresponding database.

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/33c4510e-eccd-4ee5-8e88-ca956742b02e.gif?s=76557b39c5c8f25af765b9bb46e2692f" alt="g-mutations.gif" width="2684" height="1460" data-path="images/33c4510e-eccd-4ee5-8e88-ca956742b02e.gif" />

Find below an example of operations which can be performed for created record. In this example new bug created, assigned to author of API call, description with a template content is set to bug description.

```graphql theme={null}
mutation {
  stories {
    create(name: "Super Bug") {
      message
    }
    assignToMe {
      message
    }
    appendContentToDescription(
      value: "This is a description of *{{Name}}*"
    ) {message}
  }
}
```

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/e3efc336-e80c-45ef-b827-77eed79754b4.png?fit=max&auto=format&n=lUFkgk4SW9_Hi0iL&q=85&s=8880569aa77762e8839632f0c41f0a6a" alt="image.png" width="1380" height="656" data-path="images/e3efc336-e80c-45ef-b827-77eed79754b4.png" />

For creating multiple records batch operation command **createBatch** can be used.

```graphql theme={null}
mutation {
  stories {
    createBatch(data: [
      {name: "Bug 1"}
      {name: "Bug 2"}
    ]) {
      entities {
        id
      }
    }
    assignToMe {
      message
    }
    appendContentToDescription(value: "TBD") {
      message
    }
  }
}
```

Find below the example of operations which can be performed for found records by provided filter as params to root node of mutation. Bugs with word “first” in name are moved into “In Progress” state, sprint is unlinked, found bugs are assigned to author of API call and the owner of found stories is notified.

```graphql theme={null}
mutation {
  bugs(name: {contains: "first"}) {
    update(state: {name: {is: "In Progress"}}) {
      message
      entities {
        id
      }
    }
    unlinkSprint {
      message
    }
    assignToMe {
      message
    }
    notifyCreatedBy(subject: "Assigned to Aleh") {
      message
    }
  }
}
```

<img src="https://mintcdn.com/fibery/lUFkgk4SW9_Hi0iL/images/5105bcf6-5c70-424e-8bbe-a03ef8ec7cd5.png?fit=max&auto=format&n=lUFkgk4SW9_Hi0iL&q=85&s=4bb9022d22496e1ecf0fbe07583f1a8d" alt="image.png" width="1380" height="650" data-path="images/5105bcf6-5c70-424e-8bbe-a03ef8ec7cd5.png" />

<Callout icon="https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/svg/1f9ea.svg" color="#673db6">
  Read more about [GraphQL mutations](/guides/graphql/mutations).
</Callout>

## Samples

### Retrieve tasks assigned to current user

```graphql theme={null}
{
  findTasks(assignees: {contains: {id: {is: "$my-id"}}}) {
    name,
    description {
      md
    }
  }
}
```

### Retrieve content of rich fields and documents

You can download content of rich fields or comments in four formats: `jsonString`, `text`, `md`, `html`.

```graphql theme={null}
{
  findFeatures {
    name,
    description {
      text
    }
  }
}
```

### Batch update of multi select field

Set values "One" and "Two" to multi select field.

```graphql theme={null}
mutation {
  tasks(multiSelect: {isEmpty: true}) {
    update(
      multiSelect: {name: {in: ["One", "Two"]}}
    )
    {
      message
    }
  }
}
```

### Assign tasks to current user

```graphql theme={null}
mutation {
  tasks(assignees: {notContains: {id: {is: "$my-id"}}}) {
    assignToMe {message}
  }
}
```

### Change value of rich field

Let's assume `Feature` database has rich field `Description`. Rich field can be updated using methods below.

<Callout icon="https://cdn.jsdelivr.net/gh/jdecked/twemoji@latest/assets/svg/1f91d.svg" color="#fc551f">
  [Markdown Templates](https://the.fibery.io/@public/User_Guide/Guide/Markdown-Templates-53) are supported as well.
</Callout>

```graphql theme={null}
mutation {
  features(id: {is: "ABC"}) {
    overwriteDescription(value: "rewrite {{NAME}} desc") {message}
    appendContentToDescription(value: "text to append") {message}
    prependContentToDescription(value: "text to prepend") {message}
  }
}
```

### Clear values with GraphQL

```graphql theme={null}
mutation {
  stories(id: {isNull: false}) {
    update(myDate: null) {message}
  }
}
```
