Hey guys, I was wondering for the most part is see...
# orm-help
s
Hey guys, I was wondering for the most part is seems like Prisma allows you to run queries/mutations on the database. But I was wondering how are cases handled where you want to run a mutation that doesn't directly alter database records (e.g. you need to communicate with an external API or run some background task, etc). Thank you!
w
In most cases, you’re running your own graphql server in front of prisma, and then delegates the incoming queries to the prisma layer. Which means you’re essentialy working on a simple NodeJS environment, which means you’re free to do whatever you want, use
fetch
or some packages if you need, perform IO tasks etc etc
m
Amen!
🙏 2
p
as @weakky explained, you are working in a node environment, meaning you really don't need to do anything special. in my opinion, you should decide first if you want to expose this mutation to your client application or hide it behind your app server
s
@weakky does that mean you can build a GraphQL server in any language, or is it specifically tied to NodeJS?
w
You can theoretically build one in any language you want. One downside though, is that you won’t be able to use
graphql-bindings
yet. And that my friend, you don’t want to spit on them fast parrot
n
@Sikula what preferred language do you have for the GraphQL Server?
we're investigating bindings in other languages, in particular Java, Go and Python
s
I was looking into Elixir, specifically because it was very good websocket (and thus Subscription support). The other option I had in mind was Go, but I haven't seen many examples that use subscriptions
n
Interesting, the bindings concept is not tied to NodeJS, and it would be super interesting to push this forward to Elixir as well 🙂
d
I was thinking maybe an implementation in brainfuck could be useful 🙌
w
Maaaaan, I thought the exact same bullshit 😂
🤣 2
n
might actually be funny for a hackathon project 😉
🦜 2
m
Only after we do FORTRAN first.
😆 2