I think we're at the point where we need a https://the-guild.dev/graphql/modules-like approach. Our GraphQL schema is currently about this size.
{:interfaces 25,
:mutations 171,
:objects 451,
:unions 124,
:scalars 12,
:input-objects 88,
:directive-defs 2,
:enums 127,
:queries 209}
I'm curious how others are dealing with schemas of any size.
By the way, Lacinia works really well without much effort. It's great.My schema is a lot smaller than yours but it was starting to feel too big for a single EDN file. So I've been breaking it into multiple files named to match the namespaces of the corresponding resolver functions. To build the schema, I slurp the files, parse them and then use (apply merge-with merge schema-parts) . If or when I move my queries to be fields of the Query object as recommended in the latest lacinia docs, this will have to do a deeper merge.
Currently I do all my resolver injecting in one place, after the merge, but I've been thinking about making each resolver namespace responsible for injecting its resolvers into its chunk of schema before the merge.
Yes we do medley/deep-merge to munge schema parts because we migrated some of them to use [:objects :Query] instead of [:queries].
Recently, I'm working on adding a prebuild step that generates a unified schema.
In dev workflow, watchman detects schema changes under schema directory then triggers a stitch function that merges them together.
Aaaaand... I've rolled up some tools similar to this. https://github.com/green-labs/tools.graphql?tab=readme-ov-file#merge-edn-schemas Please take a look if you are interested.