-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
RFC: Implement a CLI for programmatic TS LSP & Checking tasks #76
Comments
I'm currently using https://github.com/Quramy/ts-graphql-plugin but I'm hoping to eliminate the slow file generation step completely. Maybe Here is our current script running in CI:
It seems like gql.tada could work the same way, but replace line 1 with Alternatively, I guess it would be possible to: not commit Either way, is there a workaround for now to generate the introspection file programmatically? |
@wyattades A rough version of the code that generates the introspection file in a CLI is already on |
is there a way rn to programmatically generate graphql-env.d.ts file? I don't mind creating little script in my project Thank you for your work again. Love this tool |
Summary
Currently we have a split in what the TS LSP plugin validates and what
gql.tada
validates in TS typings.gql.tada
@0no-co/graphqlsp
This creates a split experience, where the in-editor experience is cohesive, prompt, and accurate, but the
tsc
(i.e. type checking) step when compilation at build-time occurs lacks everything in@0no-co/graphqlsp
, i.e. the TS LSP plugin.This can further be summarised by the following issues:
Proposed Solution
We'd like to collect tasks for a CLI and implement them, possibly gradually over time.
A CLI would be runnable either as
$ gql.tada
or$ gql-tada
, with the following sub-commands:gql-tada init
: For setting up a projectgql-tada doctor
: For checking pre-condition (TypeScript version,tsconfig.json
, etc)gql.tada
functioning properly (e.g. for performance reasons)gql-tada check
: For checking/linting steps in the TS LSP (document validation, unused fields, etc) as lint ruleseslint --fix
doesgql-tada generate-output
: For generatingtadaOutputLocation
i.e. generated filegql-tada generate-schema
: For generating aschema
that the TS LSP plugin can consumeschema.graphql
file and can be supplemented by this CLIgql-tada generate-persisted
: For generating a list of persisted documents (TBD for future RFC)The exact names of these subcommands isn't determined yet.
Requirements
TBD
gql-tada check
andgql-tada generate-output
must be runnable in CIThe text was updated successfully, but these errors were encountered: