---
title: "gql 3"
description: "```gql query { directory { withNewDirectory(path: \"foo\") { withNewDirectory(path: \"foo/bar/baz\") { withNewFile(path: \"foo/bar/greeting\", contents: \"hello, world!\\\\n\") { foo: entries(path: \"foo\") bar: entries(path: \"foo/bar\") greeting: file(path: \"foo/bar/greeting\") { contents } } } } } } ```"
type: skill
canonical_url: https://claudary.paisolsolutions.com/skills/gql-3
source: "Claudary"
difficulty: intermediate
author: "Claude Code Knowledge Pack"
date: 2026-07-10T11:25:03.397Z
license: CC-BY-4.0
attribution: "gql 3 — Claudary (https://claudary.paisolsolutions.com/skills/gql-3)"
---

# gql 3
```gql query { directory { withNewDirectory(path: "foo") { withNewDirectory(path: "foo/bar/baz") { withNewFile(path: "foo/bar/greeting", contents: "hello, world!\\n") { foo: entries(path: "foo") bar: entries(path: "foo/bar") greeting: file(path: "foo/bar/greeting") { contents } } } } } } ```

## Overview

```gql
query {
  directory {
    withNewDirectory(path: "foo") {
      withNewDirectory(path: "foo/bar/baz") {
        withNewFile(path: "foo/bar/greeting", contents: "hello, world!\\n") {
          foo: entries(path: "foo")
          bar: entries(path: "foo/bar")
          greeting: file(path: "foo/bar/greeting") {
            contents
          }
        }
      }
    }
  }
}
```

---

Source: [Claudary](https://claudary.paisolsolutions.com/skills/gql-3) · https://claudary.paisolsolutions.com
