Open noseworthy opened 2 years ago
Dummy here realized that we can just change up the order of our index and move the __t
field to some other position and this should work 🤦♂️. However, it'd be great to be able to provide a name override for these sort enums to get around this.
Sorry if this is covered somewhere else, but I'm running into issues trying to compose a schema for a discriminator with an index.
graphql-compose-mongoose
wants to create sort types for my model, but since I'm using the default discriminator key of__t
I'm getting the following error:Has anyone figured out how to get around this? Is there some way to alias that field? We're not in a position to change our discriminator keys at the moment.
Here's a basic example:
This fails and the result object looks like: