Good Day folks, looking at a few of the issues aro...
# orm-help
z
Good Day folks, looking at a few of the issues around Nx, this one in particular is kind of close. We're working on a lot of projects that are leveraging shared modules which are wrapping functionality to be federated or reused. Basically what we're trying to figure out, which does not appear to be supported yet, is to have multiple application level prisma.seeds that we can use to deploy independent applications, but those seeds need to import shared tables and relationships from modules that are either in the nx workspace or from modules that are installed via NPM. These shared modules would be common things like User Management for example. Has anyone seen something like this being done in an official / unofficial capacity. My searches on docs and GH issues didn't yield anything exactly matching what we're trying to do.
r
we are also using NX with multiple apps. we are not using seeds though. our sharing comes mostly from graphql code generation from apllo server schema. so far it's working good for us.
client apps generates code with full type safety from your schema + .graphql files.
if you still want to use multiple package.json files with NX it's somewhat possible using custom executors. but it's a bit of headache.
I wouldn't recommend to use multiple package.json files in a NX project. that being said if I remember correctly you can replace project.json with package.json file and NX should still work.
z
thats interesting that graphql code generator is able to handle it. I wonder if that approach can be adopted by the seed and the default schema usage as well. (We're not using graphql)
r
apllo has apllo federation
you can check it out
it will allow you to work with multiple graphs and sub graphs
👍 1
z
appreciate it, will have to do some digging
r
GL
z
Hopefully I can find something that doesnt require GQL or at least borrow from what they did :D
r
prisma + graphql is a very powerful combo if you know your stuff...