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
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:
Name "__T_DESC" must not begin with "__", which is reserved by GraphQL introspection.
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.
{
"errors": [
{
"message": "Name \"__T_ASC\" must not begin with \"__\", which is reserved by GraphQL introspection."
},
{
"message": "Name \"__T_DESC\" must not begin with \"__\", which is reserved by GraphQL introspection."
},
{
"message": "Name \"__T__BREED_ASC\" must not begin with \"__\", which is reserved by GraphQL introspection."
},
{
"message": "Name \"__T__BREED_DESC\" must not begin with \"__\", which is reserved by GraphQL introspection."
}
]
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: