You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GQless was created based upon the pain of having to manually update GraphQL queries, and then furthermore update your application.
Tooling such as graphql-inspector can assist with updating queries, but it still leaves the burden on you to update application-code.
GQless provides a standard type-safe model of accessing data from a schema within your application. With this type-safe guarantee, it allows us to fully utilize the TypeScript API to perform complex refactorings.
Example
Let's say you've just renamed a field in your API:
typeUser {
login -> username
}
and you have the following code:
functionApp(){return<div>{query.me.login}</div>}
With the knowledge of this diff, we can perform a rename of the login field in the schema:
constschema={User: {login: "String!"// ^^^^^// Perform a rename of this token (AKA what you'd do if you pressed F2 in the editor)},}
TypeScript will scan the project for all references, and then update the app to:
functionApp(){return<div>{query.me.username}</div>// ^^^^^^^^// The new field name}
Workflow
Development
This would be an amazing tool baked into watch-mode. During development you often rename fields / types multiple times.
CI
This would also be amazing as a CI plugin.
In one-click, your could merge a PR that updates your entire codebase to a new version of a GraphQL API.
If there are unresolvable conflicts, the PR could list the exact lines in your app where they arise and automatically tag the code owners in the description.
The text was updated successfully, but these errors were encountered:
Intro
GQless was created based upon the pain of having to manually update GraphQL queries, and then furthermore update your application.
Tooling such as graphql-inspector can assist with updating queries, but it still leaves the burden on you to update application-code.
GQless provides a standard type-safe model of accessing data from a schema within your application. With this type-safe guarantee, it allows us to fully utilize the TypeScript API to perform complex refactorings.
Example
Let's say you've just renamed a field in your API:
and you have the following code:
With the knowledge of this diff, we can perform a rename of the
login
field in the schema:TypeScript will scan the project for all references, and then update the app to:
Workflow
Development
This would be an amazing tool baked into watch-mode. During development you often rename fields / types multiple times.
CI
This would also be amazing as a CI plugin.
In one-click, your could merge a PR that updates your entire codebase to a new version of a GraphQL API.
If there are unresolvable conflicts, the PR could list the exact lines in your app where they arise and automatically tag the code owners in the description.
The text was updated successfully, but these errors were encountered: