typed-graphqlify VS io-ts

Compare typed-graphqlify vs io-ts and see what are their differences.


Build Typed GraphQL Queries in TypeScript without the code generation (by acro5piano)


Runtime type system for IO decoding/encoding (by gcanti)
Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Scout APM - Less time debugging, more time building
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
typed-graphqlify io-ts
2 58
623 5,402
- -
5.6 2.6
15 days ago 26 days ago
TypeScript TypeScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of typed-graphqlify. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-04-20.
  • TypeScript with GraphQL done right πŸ—
    2 projects | reddit.com/r/graphql | 20 Apr 2021
    I find DTO models tightly coupled with the persistence layer very brittle and hard to maintain in general. This is why I wish there was a robust code-first solution that would generate only GraphQL types and helpers and nothing else. There is typed-graphqlify, but I'm not sure how ready it is for production.
  • Strongly-typed GraphQL without code generation?
    2 projects | reddit.com/r/reactjs | 6 Apr 2021
    I found typed-graphqlify, which looks really promising. It creates GraphQL schema with its own TypeScript DSL. This is similar to the awesome io-ts, which does the same thing for data validation.


Posts with mentions or reviews of io-ts. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-04.
  • Notes on Advanced TypeScript: Runtime Validations
    2 projects | dev.to | 4 May 2022
    io-ts is written by Giulio Canti and offers runtime type validations. For more information on io-ts consult the README. The terminology we will use is to encode/decode is codecs, so called runtime representations of specific static types and these codecs can then be composed to build even larger type validations.
  • I'm seriously losing my mind here.. Why is this of type 'never'?
    2 projects | reddit.com/r/typescript | 12 Apr 2022
    I added some naive examples of using typeguards to assert the types at runtime. But you're much better off using a library like zod or io-ts for this.
  • We don't need runtime type checks
    3 projects | news.ycombinator.com | 3 Mar 2022
    That works wonderful as long as you have a flexible type system like Typescript. For me io-ts[0] has been a godsend when I want runtime type-checking on io boundaries (and you may have a lot of them in a front-end application).

    [0]: https://github.com/gcanti/io-ts/blob/master/index.md#typescr...

  • Announcing TypeScript 4.6
    1 project | reddit.com/r/javascript | 2 Mar 2022
    As for one of the posts above mentioning not being able to check for extraneous fields. That's a design issue not a TypeScript issue. As soon as you say that an API response is of a certain type you're missing the mark. API results are unknown and you run a decoder to verify if it's the object you're expecting. There are libraries that help you do this for example io-ts.
  • Active fork of superstruct?
    3 projects | reddit.com/r/typescript | 1 Mar 2022
    I've used io-ts successfully in the past. It is one of the most popular solutions for typesafe validation.
  • Features of a dream programming language: 2nd draft.
    16 projects | dev.to | 10 Feb 2022
    Syntax matters: Readability should not imply a one to one match with natural language (counter-inspired by SQL), since natural language is inconsistent, duplicitous, ambivalent and multi-faceted. Consistency is key to a programming language. But it should borrow some similarities from natural language (like its popular Subject-Verb-Object, SVO, structure; see also DFFP) to make adoption easier (more at-hand/intuitive). The SVO syntax also aligns elegantly with the Graph Data model of RDF (subjec-predicate-object triples), and if code-is-data (homoiconicity or pseudo-homoiconicity is preserved) it could be interesting to have the code map well to a graph database, opening up avenues for analysis in the form of advanced graph algorithms, which could be useful for, say, code complexity analysis (e.g. more straightforward cyclomatic complexity analysis). Homoiconicity (code structure mirroring a data structure) could potentially also help with respect to typing, since we want to be able to execute the same code at compile-time (statics) and run-time (dynamics), to avoid the biformity and inconcistency of static languages: "the ideal linguistic abstraction is both static and dynamic; however, it is still a single concept and not two logically similar concepts but with different interfaces." To avoid duplication. This is also inspired by NexusJS and io-ts: "The advantage of using io-ts to define the runtime type is that we can validate the type at runtime, and we can also extract the corresponding static type, so we don’t have to define it twice."
  • Checkmate by Kyle Simpson
    2 projects | reddit.com/r/learnjavascript | 28 Jan 2022
    I took a look through the repo. It's definitely an interesting project and I applaud the effort at taking on such a monumental task! Although to be honest I'm still struggling to see what benefits this would offer over TypeScript plus something like zod or io-ts for runtime type checks.
  • How to check that an 'unknown' object has a specific key and that the key is a specific type?
    5 projects | reddit.com/r/typescript | 11 Jan 2022
    Seconding the recommendation to use a library for this. runtypes and io-ts are two other alternatives.
  • TypeScript Decoders and why they Matter if you care about robust code
    8 projects | reddit.com/r/programming | 23 Dec 2021
    I don't think "validator" is the right word though - validator implies a thing that tells you whether the data is valid or not (boolean). These "decoders" generally take it a step further, they provide the narrowed type (if the decode is successful). io-ts calls the data structure a "codec", because it can be used to both encode and decode data.
    8 projects | reddit.com/r/programming | 23 Dec 2021
    I just checked it out and I dunno, the syntax feels arcane for the first glance (yeah I know it is based on pure functional programming and algebraic types). Also I don't see a lot of examples in their documentation either. Maybe once you get into it it gets really good but from the first glance it looks unfriendly.

What are some alternatives?

When comparing typed-graphqlify and io-ts you can also consider the following projects:

zod - TypeScript-first schema validation with static type inference

class-validator - Decorator-based property validation for classes.

fp-ts - Functional programming in TypeScript

runtypes - Runtime validation for static types

joi - The most powerful data validation library for JS

ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)

openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

newtype-ts - Implementation of newtypes in TypeScript

Yup - Dead simple Object schema validation

ts-auto-guard - Generate type guard functions from TypeScript interfaces

class-transformer - Decorator-based transformation, serialization, and deserialization between objects and classes.

maplibre-gl-js - The open-source fork of Mapbox GL JS: Interactive maps in the browser, powered by vector tiles and WebGL.