Skip to content

Commit 2ed7661

Browse files
graylikemeclaude
andcommitted
docs: document cumulative rulesLevel filter and allChassis example
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6546418 commit 2ed7661

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,16 @@ The server starts on `http://localhost:8080`. In debug builds, GraphiQL is avail
219219
}
220220
}
221221

222+
# List chassis filtered by rules level (cumulative)
223+
{
224+
allChassis(unitType: MECH, rulesLevel: STANDARD) {
225+
slug
226+
name
227+
techBase
228+
tonnage
229+
}
230+
}
231+
222232
# Equipment with stats and ammo relationships
223233
{
224234
equipment(slug: "autocannon-10") {
@@ -269,7 +279,7 @@ The `units` query supports the following filters:
269279
|--------|------|-------------|
270280
| `nameSearch` | String | Case-insensitive substring match on `fullName` and `clanName` |
271281
| `techBase` | String | `inner_sphere`, `clan`, `mixed`, `primitive` |
272-
| `rulesLevel` | String | `introductory`, `standard`, `advanced`, `experimental`, `unofficial` |
282+
| `rulesLevel` | Enum | Cumulative rules level filter. E.g. `ADVANCED` includes introductory, standard, and advanced |
273283
| `tonnageMin` / `tonnageMax` | Float | Weight range in metric tons |
274284
| `factionSlug` | String | Units available to this faction (e.g. `"clan-wolf"`) |
275285
| `eraSlug` | String | Units available in this era (e.g. `"clan-invasion"`) |
@@ -286,7 +296,7 @@ The `allEquipment` query supports additional builder-oriented filters:
286296
| `nameSearch` | String | Case-insensitive substring match on equipment name |
287297
| `category` | String | Equipment category in snake_case (e.g. `"energy_weapon"`) |
288298
| `techBase` | String | `inner_sphere`, `clan`, `mixed`, `primitive` |
289-
| `rulesLevel` | String | `introductory`, `standard`, `advanced`, `experimental`, `unofficial` |
299+
| `rulesLevel` | Enum | Cumulative rules level filter. E.g. `ADVANCED` includes introductory, standard, and advanced |
290300
| `maxTonnage` | Float | Equipment weighing at most this many tons |
291301
| `maxCrits` | Int | Equipment consuming at most this many critical slots |
292302
| `observedLocation` | String | Equipment observed at this location (e.g. `"right_arm"`) |

crates/api/src/handlers/llms_txt.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ GET {base_url}/schema.graphql
1919
- **Slugs**: lowercase, hyphen-separated identifiers. Examples: "atlas-as7-d", "clan-wolf", "medium-laser". Chassis slugs include the unit type suffix: "atlas-mech", "demolisher-vehicle"
2020
- **Years**: in-universe BattleTech timeline years (e.g. 3025, 3055), not real-world dates
2121
- **Tech base** (enum TechBaseFilter): INNER_SPHERE, CLAN, MIXED, PRIMITIVE
22-
- **Rules level** (enum RulesLevelFilter): INTRODUCTORY, STANDARD, ADVANCED, EXPERIMENTAL, UNOFFICIAL
22+
- **Rules level** (enum RulesLevelFilter): INTRODUCTORY, STANDARD, ADVANCED, EXPERIMENTAL, UNOFFICIAL — filter is cumulative: e.g. ADVANCED returns introductory + standard + advanced
2323
- **Equipment category** (enum EquipmentCategoryFilter): ENERGY_WEAPON, BALLISTIC_WEAPON, MISSILE_WEAPON, PHYSICAL_WEAPON, AMMUNITION, EQUIPMENT, ARMOR, STRUCTURE, ENGINE, GYRO, COCKPIT, ACTUATOR, HEAT_SINK, JUMP_JET, TARGETING_COMPUTER
2424
- **Unit type** (enum UnitTypeFilter): MECH, VEHICLE, FIGHTER, OTHER
2525
- **Era** (enum EraFilter): AGE_OF_WAR, STAR_LEAGUE, EARLY_SUCCESSION_WARS, LATE_SUCCESSION_WARS, RENAISSANCE, CLAN_INVASION, CIVIL_WAR, JIHAD, DARK_AGE, IL_CLAN
@@ -403,6 +403,18 @@ To paginate: pass `endCursor` from the previous response as `after` in the next
403403
}}
404404
}}
405405
```
406+
407+
### List chassis filtered by rules level and unit type
408+
```graphql
409+
{{
410+
allChassis(unitType: MECH, rulesLevel: STANDARD) {{
411+
slug
412+
name
413+
techBase
414+
tonnage
415+
}}
416+
}}
417+
```
406418
"#,
407419
base_url = base_url,
408420
)

0 commit comments

Comments
 (0)