How do we disable "subscriptions" on the server?
# orm-help
c
How do we disable "subscriptions" on the server?
e
I'm a Prisma noob, so don't know the answer. But why would you want to disable subscriptions? Usually you would have another GraphQL server infront of Prisma and that would dictate what would and not would be accessible.
👍 1
c
Subscriptions add additional schema to the schema file when imported into graphql tools such as makeExecutableSchema. If you dont use the subscriptions, you can see an order of magnitude in performance when you server loads that file. Depending on your scenario, this may or may not be an advantage to you. For our team, running several serverless functions that load that schema for highspeed processing, that additional load time can be a huge burden.
We have done tests with our particular schema, and removing the subscriptions by hand, our schema loads 4.5x quicker.
e
Woah, that is a very good point and a lot of wasted resources. Maybe make an issue about this on Github with your finding? Would be nice to be able to configure what features are needed. – Sorry I don't know anything about solving it, except run post processing on the generated file like
gulp
or similar tools to remove what is not needed.