MichalLytek / MichalLytek/type-graphql

Using only typedefs, not resolvers

Open
#339 12 comments 4 reactions 0 assignees View on GitHub
Community :family_man_girl: Enhancement :new:
Dominant language
TypeScript
Stars
8.1k
Forks
672
PR merge metrics
No merged PRs in 30d

Description

I would like to use only the typeDef generating capabilities of this library without using the resolvers, since I prefer the apollo-style resolvers. https://github.com/19majkel94/type-graphql/issues/222 makes me think it should be possible, but I could not find the way to do it in the documentation. Could you point me to which function to use?

As far as I can see, the `buildTypeDefsAndResolvers` function as described in https://github.com/19majkel94/type-graphql/pull/233 still requires me to write (minimal) resolvers?

Is there a function such as `buildTypeDefs` where I could pass in an array of my ObjectType/InputType classes to generate typeDefs?

Contributor guide

Open the contributing guide

Research direction

Start with the documentation for buildTypeDefsAndResolvers and the linked pull request 233, then compare the documented API with the requested buildTypeDefs-style entry point. Done means the ObjectType/InputType classes can generate typeDefs without requiring resolvers, with the behavior documented and covered by the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.