xiaohongshu
xiaohongshu
refresh-tarkovdev-schema
Update the tarkov.dev GraphQL schema and regenerate the Go client code
Full skill instructions
Use this skill when updating the tarkov.dev GraphQL schema or regenerating the Go client.
# Fetch latest schema and regenerate client
task tarkovdev
This runs two steps:
tarkovdev:get-schema - Downloads the latest schema from tarkov.devtarkovdev:regenerate - Regenerates Go code from your queriestask tarkovdev:get-schema
What it does:
https://api.tarkov.dev/graphqlinternal/tarkovdev/schemas/schema.graphqlRequirements:
graphql-inspector CLI tool (installed via task deps:install:node)If you want to use new fields, update your queries in:
internal/tarkovdev/schemas/queries.graphql
Example: Adding a new field to an existing query
query GetWeapons {
items(type: weapon) {
id
name
# Add new fields here
weight
basePrice
}
}
task tarkovdev:regenerate
What it does:
genqlient code generatorgenqlient.yaml configurationinternal/tarkovdev/generated-queries.goConfiguration file: genqlient.yaml
schema: internal/tarkovdev/schemas/schema.graphql
operations:
- internal/tarkovdev/schemas/queries.graphql
generated: internal/tarkovdev/generated-queries.go
# Check what changed
git diff internal/tarkovdev/
# Ensure it compiles
go build ./...
# Run relevant tests
go test ./internal/tarkovdev/...
go test ./internal/importers/...
After regeneration, internal/tarkovdev/generated-queries.go contains:
GetWeapons(ctx, client), GetMods(ctx, client), etc.Example generated code:
type GetWeaponsResponse struct {
Items []GetWeaponsItem `json:"items"`
}
type GetWeaponsItem struct {
Id string `json:"id"`
Name string `json:"name"`
// New fields appear here automatically
}
func GetWeapons(ctx context.Context, client graphql.Client) (*GetWeaponsResponse, error) {
// Generated query execution
}
internal/tarkovdev/schemas/queries.graphqlquery GetTraderOffers {
traders {
id
name
cashOffers {
item {
id
name
}
price
}
}
}
task tarkovdev:regenerate
import "tarkov-build-optimiser/internal/tarkovdev"
resp, err := tarkovdev.GetTraderOffers(ctx, graphqlClient)
queries.graphqltask tarkovdev:regeneratequeries.graphqltask tarkovdev:regenerate# Open in your editor
code internal/tarkovdev/schemas/schema.graphql
The schema shows:
# Look for the type you're interested in
type Item {
id: ID!
name: String
weight: Float
types: [ItemType!]!
# ... many more fields
}
type Query {
items(type: ItemType): [Item]
item(id: ID!): Item
traders: [Trader]
# ... etc
}
Error: Can't connect to api.tarkov.dev
Solutions:
curl https://api.tarkov.dev/graphqlError: genqlient errors during regeneration
Check:
Debug:
# Validate your queries manually
cat internal/tarkovdev/schemas/queries.graphql
# Check genqlient version
go list -m github.com/Khan/genqlient
After regeneration, Go build fails
Solutions:
You fetched the schema but new fields aren't available
Check:
task tarkovdev:get-schema?queries.graphql?task tarkovdev:regenerate after updating queries?schema.graphql)https://api.tarkov.dev/graphqlinternal/tarkovdev/schemas/schema.graphqlinternal/tarkovdev/schemas/queries.graphqlinternal/tarkovdev/generated-queries.gogenqlient.yamlinternal/tarkovdev/tarkov-dev.goInstalled via task deps:install:node:
graphql-inspector - For schema introspectionInstalled via task deps:install:go:
github.com/Khan/genqlient - For code generationxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience