-
-
Notifications
You must be signed in to change notification settings - Fork 676
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
Documentation improvements #173
Comments
At the beginning TypeGraphQL aimed for apollo-ecosystem users, like In GraphQL specification there's no distinction between I know that "controllers" might be more intuitive name for people that comes from HTTP frameworks like Spring, routing-controllers or Nest. But even in Nest you have resolvers that encapsulate all the GraphQL logic related to a scope, like an User - all queries and mutation that are related to User + it's field resolvers: There's no technical obstacles to separate controler-like class from field-resolver-like class. You can do this now and name it whatever you want, like await buildSchema({
resolvers: [UserResolver],
controllers: [UserController],
}); Which I think is a bad idea as it over complicates things. There's already a note about the resolvers to controllers relation:
But we can make this paragraph a bit more clear 😉 |
Eeks, I've never considered a GraphQL resolver to be a controller. GraphQL !== MVC. GraphQL === GraphQL. :P |
Yeah that really threw me. All the examples are of thing's I consider inappropriate usages of GraphQL. I would strongly recommend that you choose an examples where you at very least have types that have relationships to each other. For example I can't understand how to create a type definition that includes calls. Your documentation suggests that resolvers, which you liken to controllers, have calls with arguments, and models don't. But while that's how MVC works it isn't how GraphQL works. |
@conartist6
You have many relations in TypeORM example. Simple examples only demonstrates simple features, like deprecations, descriptions or authorization. So please, rewrite your sentences to a more understandable English and maybe add some examples, background of what you were trying to achieve, etc. |
One documentation bug I noticed is that the Getting Started page references a "RecipeService" in the constructor of the sample resolver, but I can't find where this is defined (except to infer what it is based on the usage) |
@jeremyong Because it's a getting started, short guide, so its implementation give no valuable info in the context of TypeGraphQL - it's just an injected class instance which works like a group of CRUD methods which you can infer from the usage. |
I now think #1206 fits there. |
The documentation was written a bit carelessly because that time I was focusing on iterating with code and features. Also my English is rather on B2/C1 level. That's why there might be some typos and grammar mistakes 😞
So I would like to ask the community to get involved in this project and help making TypeGraphQL great
againat least 😄 If you found a typo or other mistake in docs, feel free to report it or even create a PR with fix for that!Also, there are some voice that some design goals and architectural choices that I've made are a bit non-intuitive:
So if you find something like that - also feel free to report that. I will try to clarify it and improve the docs or maybe it might be a good point for a new feature?
Thank you, guys!
Let's contribute and celebrate Hacktoberfest! 🎉
The text was updated successfully, but these errors were encountered: