Closed KirillDogadin-std closed 12 months ago
@valiafetisov time for opinion
If the module is conform with nexus structure, then it's quite easy to just define it and import to the schema. In more sofishticated cases when we e.g. need to define crud operations in models.ts
. See the tricks that i've used to make it work together.
Disclaimer: the example directories with "modules" contain package.json
s from the api that is barely different. So CI fails and the installations there do not make sense. I.e. the code here is just to showcase how things would be modularized but not a reviewable code.
did the independent counter example, the gql query for it:
query {
countUsers(message: "aslekjf") { count, message}
}
Currently trying to find a way of writing the module so that the type system remains intact. To discuss this issue i would assume that code demo should be available, hence will open a separate draft PR that is not for merging but for demo purposes only. #68
I've added a readme section on how to make new modules: https://github.com/powerhouse-inc/switchboard-boilerplate/blob/b863e6a2b778fe572298123caa981cc1d33b8ecf/api/README.md#adding-new-modules
Closes https://github.com/powerhouse-inc/switchboard-boilerplate/issues/61