Deployment Strategies for Non-Serverless APIs

Hello,

I am hoping someone can take the time to provide me with some feedback as to how to go about a problem my team is running into deploying to production.

Our setup is still a bit old school but basically we have a mono repo with both client and server code. When a PR is merged we have 2 different CodePipeline pipelines in AWS. One deploys the server to EC2 instances (using beanstalk) and one deploys the front end code.
Our issue is that the API right now is setup in a rolling deploy. So basically AWS fires up one instance with the new code and slowly transitions new instances to the new version of the API code.
Meanwhile, the front-end code deploys separately and is usually live before the production pipeline finishes.

So this is where our problem arises. New versions of the client code sometimes contain changes to queries (lets say an added field). If this new version of the client happens to request the data from an instance that is still in the old version of the server, the client gets an error because of the GQL validation for a field that is not in that instance’s schema yet (error GRAPHQL_VALIDATION_FAILED).

In theory I could get by with partial data returning from the server but, as far as I can tell, GQL refused to run the query entirely because it thinks it is invalid.

So what I am looking for are maybe suggestions or to see if anyone else has run into this problem. I would really appreciate any insights.

Thank you.