This repository has been archived by the owner on Dec 4, 2022. It is now read-only.
·
32 commits
to main
since this release
[39みゅーじっく!] is the 100th star release for KingWorld 🎉
This release doesn't have a big change for the code but has a big change for the community.
Nested Schema
.39 introduce better support for the nested schema.
Instead of inheriting the global schema first, KingWorld now handles the local schema first.
If a duplicated schema is found, KingWorld now infers type correctly instead of having infinite cycling.
Community Plugin: Controllers
Now we have another community plugin, Controllers is a plugin for defining decorator and controller-based routing.
import { Controller, Get, kwControllers } from 'kingworld-controllers';
// /users prefix
@Controller('/users/')
class UsersController {
@Get()
index() {
return 'Hello World'
}
}
const app = new KingWorld()
app.use(kwControllers, {
controllers: [UsersController],
})
app.listen(3000);
GraphQL support with Yoga
With @kingworldjs/graphql-yoga, you can now use GraphQL Yoga with KingWorld.
Change Log
Breaking Change:
method
is changed toroute
Improvement:
LocalHook
now prefers the nearest type instead of the merge- Merge the nearest schema first
- add
contentType
as a second parameter forBodyParser
Bug fix:
- Correct type for
after handle
- Fix infinite cycling infer type for
Handler