Answer the question
In order to leave comments, you need to log in
Grapqhl backend and React native app. Is it worth merging?
Good day. There is a project project: backend + mobile application.
It is just beginning, therefore the architecture has not yet settled down. The backend is written in Node.js + GraphQL(apollo), the front is written in React Native + Apollo-client.
It turns out that the types used in GrqphQL are the same on the back as on the front. Teamlead says that it is worth rebuilding these two projects into one, because:
Answer the question
In order to leave comments, you need to log in
Normally, the team leader tells you if you do it correctly. Single Source Of Truth rules.
- different projects may well remain different projects using the same common code for both. There are many ways to do this. monorepa, module, schema registry e.g.
- you already have a mutual dependency - a common GraphQL API. You can hardly change the scheme in one project and leave it old in another. Being able to store a schema separately and change it independently is not flexibility, it's a direct road to tons of problems and a lot of wasted time. Doesn’t it bother you that every time you change the scheme in one place, you must definitely go and change it in another so that they are always synchronized, and if you don’t do this / forget / typo / copy-paste it wrong, then something somewhere will definitely break? It was at this moment that one should feel something was wrong.
- if you did not see something - this does not mean that what you did not see is bad, but what you saw is good.
In general, it is worth doing - the main thing is to do it correctly. If you now dump all the code in one heap, then of course nothing good will come of it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question