I’m trying to create rolling updates of our web ap...
# orm-help
d
I’m trying to create rolling updates of our web app, but I ran into a very specific issue: When a new prisma schema is deployed with breaking changes (e.g. a field was removed), the prisma-client of the previously deployed frontend server will no longer be able to fetch that type as its field changed (old prisma client querying already updated service). This breaks production until the new frontend servers with the updated prisma-client have spun up. Has anybody faced this problem before? How did you deal with it? Any links, pointers or advice?
v
Hi, you can proceed with a gradual deprecation of the field, and after you have updated all the old clients u can safely remove it, monitoring of the field usage and
@deprecate
directive could help. I’ve found an interesting article regarding this by GitHub Engineering blog, but I can find it anymore.. sorry and this is the general approach from the specification https://graphql.org/learn/best-practices/#versioning in short better add than remove.
for a more complex and automated solution you can validate your schema during your CI/CD pipelines
you can start here
d
Thanks a lot @Vittorio Adamo that was pretty useful 🙂
v
u’re welcome!