-
I need atomic transactions in some of my operations and was going to use Mikro ORM inside of some of my operations. Can't seem to get it to build since wundergraph is handling transpilation through the CLI and the build process is abstracted. import {
Contact
} from 'db/db/entities/Contact';
import {
createOperation,
z
} from '../../generated/wundergraph.factory';
import {
getOrm
} from 'db/db';
type ContactType = Omit<Contact, 'created_at' | 'updated_at' | 'id'>;
export default createOperation.mutation({
input: z.object({
email: z.string().email(),
name: z.string(),
phone: z.string(),
}),
handler: async ({
input,
}) => {
const orm = await getOrm();
return {
testing: '123',
};
},
}) I am running with turbo repo where the ORM (and entities) are defined in a different package. |
Beta Was this translation helpful? Give feedback.
Answered by
jensneuse
Jun 20, 2023
Replies: 1 comment 2 replies
-
I think this is what you're looking for? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't currently allow you to set the TS config but we're able to expose this so you could. You'd like to create an issue to track the progress?