MCPcopy
hub / github.com/0no-co/gql.tada

github.com/0no-co/gql.tada @1.11.2 sqlite

repository ↗ · DeepWiki ↗ · release 1.11.2 ↗
835 symbols 1,932 edges 184 files 48 documented · 6%
README

gql.tada 🪄

Magical GraphQL query engine for TypeScript

CI Status Discord

gql.tada is a GraphQL document authoring library, inferring the result and variables types of GraphQL queries and fragments in the TypeScript type system. It derives the types for your GraphQL queries on the fly allowing you to write type-safe GraphQL documents quickly.

In short, gql.tada,

  • parses your GraphQL documents in the TypeScript type system
  • uses your introspected schema and scalar configuration to derive a schema
  • maps your GraphQL queries and fragments with the schema to result and variables types
  • creates fragment masks and enforces unwrapping fragments gradually

Since this is all done in the TypeScript type system and type checker, this all happens while you edit your GraphQL front-end code and is always accurate.

In short, with gql.tada and GraphQLSP you get on-the-fly, automatically typed GraphQL documents with full editor feedback, auto-completion, and type hints!

📃 Documentation

Check out the “Get Started” section’s Installation page in the documentation.

Furthermore, all APIs and packages are self-documented using TSDocs. If you’re using a language server for TypeScript, the documentation for each API should pop up in your editor when hovering gql.tada’s code and APIs.

🔎 Let’s take a look!

Code Editor showing GraphQL queries being edited with gql.tada and GraphLSP

📦 Releases

If you'd like to get involved, check out our Contributor's guide.

All new releases and updates are listed on GitHub with full changelogs. The CHANGELOG.md file further documents all the historical changes for gql.tada.

New releases are prepared using changesets, which are changelog entries added to each PR, and we have “Version Packages” PRs that once merged will release new versions of the gql.tada package. You can use @canary releases from npm if you’d like to get a preview of the merged changes.

Extension points exported contracts — how you extend this code

DefMetrics (Interface)
Per-definition metrics gathered during traversal (own selections only).
packages/cli-utils/src/commands/scan/rules/operation-complexity.ts
AbstractSetupSchema (Interface)
Abstract configuration type input for your schema and scalars. * * @remarks * This is used either via {@link setupSch
src/api.ts
TextSpan (Interface)
(no doc)
packages/svelte-support/src/types.ts
PluginEntryResult (Interface)
(no doc)
packages/internal/src/resolve.ts
TextSpan (Interface)
(no doc)
packages/vue-support/src/types.ts
_match (Interface)
(no doc)
src/parser.ts
_match (Interface)
(no doc)
src/tokenizer.ts
DocumentDecoration (Interface)
(no doc)
src/utils.ts

Core symbols most depended-on inside this repo

resolve
called by 94
packages/cli-utils/src/commands/scan/fragment-graph.ts
readFragment
called by 36
src/api.ts
graphql
called by 32
src/api.ts
mapFilePositionFn
called by 26
packages/cli-utils/src/ts/container.ts
loadConfigs
called by 19
packages/internal/src/resolve.ts
getTypeScriptVersion
called by 19
packages/cli-utils/src/commands/doctor/helpers/versions.ts
load
called by 18
packages/internal/src/loaders/types.ts
printName
called by 16
packages/internal/src/introspection/preprocess.ts

Shape

Function 497
Interface 166
Method 101
Class 38
Enum 33

Languages

TypeScript100%

Modules by API surface

packages/cli-utils/src/ts/container.ts33 symbols
src/__tests__/tsHarness/virtualHost.ts32 symbols
packages/cli-utils/src/commands/scan/context.ts30 symbols
packages/cli-utils/src/ts/factory.ts28 symbols
packages/cli-utils/src/threads/index.ts20 symbols
packages/cli-utils/src/term/tty.ts20 symbols
packages/cli-utils/src/commands/doctor/helpers/versions.ts20 symbols
packages/internal/src/resolve.ts19 symbols
packages/cli-utils/src/commands/scan/types.ts19 symbols
packages/cli-utils/src/commands/turbo/thread.ts18 symbols
src/__tests__/tsHarness/typeCheckerHost.ts17 symbols
packages/internal/src/loaders/introspection.ts17 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@0no-co/graphql.web1.3.2 · 1×
@0no-co/graphqlsp1.17.3 · 1×
@0no-co/typescript.js5.3.2-2 · 1×
@actions/core1.11.1 · 1×
@actions/github6.0.1 · 1×
@apollo/client4.2.3 · 1×
@babel/plugin-transform-block-scoping7.25.0 · 1×
@babel/plugin-transform-typescript7.25.2 · 1×
@changesets/cli2.29.6 · 1×
@changesets/get-github-info0.6.0 · 1×
@clack/prompts0.7.0 · 1×
@gql.tada/cli-utilsworkspace:* · 1×

For agents

$ claude mcp add gql.tada \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact