Skip to content

Align Type: Utilitaire Rust pour synchroniser les types entre GraphQL et TypeScript, simplifiant ainsi votre flux de travail de développement.

License

Notifications You must be signed in to change notification settings

David-Moisan/alignType

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Align Type: Keeping Your GraphQL and TypeScript Types in Sync with a Rust Twist

Are you tired of the repetitive task of aligning your GraphQL types with your TypeScript types? Enter Align Type - a utility crafted with care in the depths of Rust to ease your pain and bring harmony to your codebase.

Usage

Currently at version 0.0.1, Align Type is just getting warmed up, but fear not, there's plenty of magic to come! While I iron out the kinks, here's how you can get started:

./align_type [path_to_graphql_schema] [path_to_typescript_type_file]

What Align Type Does

Align Type takes your GraphQL type definitions, such as:

type Test {
    id: ID!
    name: String!
    firstname: String
    roles: [Role]!
    age: Int
    is_vip: Boolean 
}

And converts them into TypeScript type declarations like:

export type Test = {
    id: number,
    name: string,
    firstname: string | null,
    roles: Role[],
    age: number | null,
    is_vip: boolean,
};

The Future Looks Bright

  • SQL mapping for those SQLite enthusiasts out there who brave the wild without an ORM and need to juggle types for SQLite, GraphQL, and TypeScript (yes, that's me too!)

  • Crafting Linux packages and Windows .exe files to ensure Align Type can strut its stuff wherever code is written.

We're open to your suggestions for improvements and eagerly await any bug reports you may have. Let's make Align Type the hero your code deserves! 🦾

About

Align Type: Utilitaire Rust pour synchroniser les types entre GraphQL et TypeScript, simplifiant ainsi votre flux de travail de développement.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published