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

feat: Output resolver types by @graphql-codegen/typescript-resolvers #47

Closed
2 tasks done
piglovesyou opened this issue Feb 9, 2020 · 0 comments
Closed
2 tasks done
Labels
enhancement New feature or request

Comments

@piglovesyou
Copy link
Owner

piglovesyou commented Feb 9, 2020

Why

Some users implement GraphQL servers in Node runtime by themselves and some users don't. For those who write resolvers will want resolver types, otherwise, they'll type signatures of resolver functions by themselves.

Mercifully there's a plugin.

import { QueryResolvers } from './resolvers-types';

export const resolvers: QueryResolvers = {
  myQuery: (root, args, context) => {},
};

How

According to the value of schema in .graphql-let.yml, graphql-let will generate schema types by default. But I'm not sure the way fits all developer use-cases. For a while, I'll publish it as an experimental feature.

@piglovesyou piglovesyou added the enhancement New feature or request label Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant