Skip to content

🪄 Magical GraphQL query engine for TypeScript

License

Notifications You must be signed in to change notification settings

craigbrunner/gql.tada

 
 

Repository files navigation

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!

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

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.

About

🪄 Magical GraphQL query engine for TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.2%
  • MDX 1.3%
  • Other 0.5%