You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have our schema split into user and admin paths. The admin path is largely simple CRUD type operations for managing objects and consist primarily of create/update/delete mutations.
There are roughly 100-200 of these interfaces. Most objects have a handful of fields but some have upwards of 20. We did not nest the fields as objects to avoid writing a lot of marshaling code - since the fields are mostly scalar types marshaling was already handled. We use the deriveContextObjectType macro to instantiate Traits into a schema.
We recently ran into the following error when some additional mutations were added:
scalac: Error while emitting com/fluxweave/graphql/InstanceSchemaAdmin
Method too large: com/fluxweave/graphql/InstanceSchemaAdmin.$anonfun$AdminMutationType$2 (Lcom/fluxweave/graphql/InstanceSchemaAdmin;Lscala/Function1;)Lscala/collection/immutable/List;
After some trial and error we were able to work around it by changing the latest interfaces into:
We have our schema split into user and admin paths. The admin path is largely simple CRUD type operations for managing objects and consist primarily of create/update/delete mutations.
The admin mutation schema looks like:
There are roughly 100-200 of these interfaces. Most objects have a handful of fields but some have upwards of 20. We did not nest the fields as objects to avoid writing a lot of marshaling code - since the fields are mostly scalar types marshaling was already handled. We use the
deriveContextObjectType
macro to instantiate Traits into a schema.We recently ran into the following error when some additional mutations were added:
After some trial and error we were able to work around it by changing the latest interfaces into:
e.g. reduce the number of top level fields
Questions:
Code causing the error
The text was updated successfully, but these errors were encountered: