Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap to 2.0 #163

Open
1 of 17 tasks
brettjurgens opened this issue Mar 22, 2018 · 2 comments · Fixed by #195 or #267 · May be fixed by #210
Open
1 of 17 tasks

Roadmap to 2.0 #163

brettjurgens opened this issue Mar 22, 2018 · 2 comments · Fixed by #195 or #267 · May be fixed by #210

Comments

@brettjurgens
Copy link
Contributor

brettjurgens commented Mar 22, 2018

  • Improve Documentation across the project (it can definitely be cryptic at times)
  • Create more sensible names for the formatters (also probably rename "formatter" to "printer")
  • First-class Flow support
  • Extract a lot of the logic to the printers, in order to handle inconsistencies across language targets (i.e. Language X doesn't have interfaces, Language Y doesn't have Partial, etc.)
  • Figure out better way of handling Fragments as seen in fix fragment spread inside of inline fragment #162
  • Custom directive support
  • Correct type for defer directive
  • Remove Legacy TS Support (force strict nullability) Remove legacy ts support #174
  • Add more tests now that more public schemas are available (github, yelp, etc.)
  • Create better interfaces to pass to Printers
  • Create webpack loader Autogenerate a JS file to make imports easier #127
  • Allow providing custom types apart from the typemap
    • i.e. query.customer.something resolves to type any but should be { a: number; b: string }
    • another use case would be if we have a union/interface and know that it will only be one type
      • i.e. query.me is of type Admin | Customer | Service but we know that it can only ever be Admin on the admin application, Customer on the customer, etc.
  • Investigate better enum support with const enums Enums break .d.ts typings #179
  • Fix Unions in 2.0.0
  • Fix Introspection in 2.0.0
@brettjurgens
Copy link
Contributor Author

@pie6k that project (as well as https://github.com/19majkel94/type-graphql, https://github.com/nicolasgere/graphql-ts, https://github.com/indigotech/graphql-schema-decorator, etc.) have very different goals from this project.

this project's goal is not to make a schema using typescript. instead, this is focused on the consumer/client side of things.

it can either:

  1. take a schema and generate type definitions from it

    type Query {
      thing: String!
      anotherThing: Boolean!
    }

    into

    interface IQuery {
      thing: string;
      anotherThing: boolean;
    }
  2. take a schema & a query and generate type definitions from it

    type Query {
      thing: String!
      anotherThing: Boolean!
    }

    and

    query GetThing {
      thing
    }

    into

    interface GetThing {
      thing: string;
    }

@kristianmandrup
Copy link
Contributor

Please add these examples to the main Readme of each package and the top level Readme.
Was not entirely clear exactly what where the inputs and outputs.

Cheers :)

This was linked to pull requests Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants