goku
10/22/2024, 1:47 AMStylianos Gakis
10/22/2024, 8:31 AMgoku
10/28/2024, 5:01 AMStylianos Gakis
10/28/2024, 6:42 AMgoku
10/28/2024, 9:55 AM.graphql
files.
1. This is a safe change for Team X’s operations. The operation is not in production yet so they know the change will not break anything.
2. They don’t wanna go through deprecation path for a type that’s not released, they want to keep the schema clean.
3. This is a safe change for Team X, but this breaks the build in the repository for everyone else.
The wise thing to do here would be:
a) Deprecation path.
b) Clean client usage first, and then remove from schema if you must.
We are working towards regulating a) and b) at scale, but also exploring other options from the client side.mbonnin
10/28/2024, 10:59 AMmbonnin
10/28/2024, 11:00 AMgoku
10/28/2024, 1:14 PMmbonnin
10/29/2024, 10:26 AMwe are looking into adding schema checks that validates the schema against the source code by using persisted query manifest filesI think that makes a lot of sense 👍 . In a way, having codegen use some fields is a kind of field usage, even if no query is made. Removing the field doesn't break the (runtime) end user but breaks the (build time) frontend dev user.
This probably will not cover all the cases, such as removing a value from EnumThis is a larger problem, right? It's impossible to tell if this breaks a runtime or build time use case without looking at the written Kotlin code. Therefore removing an enum value should always be considered breaking both at runtime and build time I think?
mbonnin
10/29/2024, 10:26 AMSubgraph schema per module.
mbonnin
10/29/2024, 10:28 AMSubgraph schema per module.I vaguely remember discussing this but this would more or less require to run federation on the client, right? At least the compose step. No need for query planning or runtime on the client but we'd need to be able to compose all those subgraphs
goku
10/30/2024, 2:32 AMThis is a larger problem, right? It’s impossible to tell if this breaks a runtime or build time use case without looking at the written Kotlin code.Yes. One option is to build the repos, but that will add overhead to development. Or we will need to write a static analysis tool. In my opinion the biggest gap is the awareness. Backend devs are not aware that their changes can break the build. Once the schema check shows green they assume it is a safe thing to do. We are also working on providing some internal guidelines and training so they understand the impact, and we show those changes as warnings.
I vaguely remember discussing this but this would more or less require to run federation on the client, right?Yes, this will be the complex part. This is how I think it would work: • 1 subgraph for shared types. Used in a root level module Every module consumes this. • X number of supgraphs per domain. A Gradle module per subgraph Before codegen, we stitch them all together and create the superschema and run the codegen. I’m probably oversimplifying this and there will be unknown unknowns, but let me know if this sounds reasonable 🙂
mbonnin
11/05/2024, 5:35 PMmbonnin
11/05/2024, 5:36 PMgoku
11/08/2024, 3:54 AMwhether the backend subgraph should translate 1:1 in the frontendI didn’t quite understand this 🤔
mbonnin
11/08/2024, 8:34 AMmbonnin
11/08/2024, 8:34 AM