-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue adding Enum field into a remote_schema #3540
Comments
I tried with the type definition just like in the docs page and it worked: enum user_role_enum {
"Users with the privilege to set users’ roles"
administrator
"Users with the privilege to ban users"
moderator
"Ordinary users"
user
} What is confusing in this case is that the type definition returned from the introspection query is the same as my first comment. enum user_role_enum {
# Users with the privilege to set users’ roles
administrator
# Users with the privilege to ban users
moderator
# Ordinary users
user
} Always when creating a remote schema I use the returned type from the instrospection query, to make sure both types are the same. And that is why I got this error. If there is a way for it to be the same. Or if Hasura could strip out the comments when comparing enum types that would be good. Thanks |
@lexi-lambda @rakeshkky Any thoughts why equating types
with
would fail? Either way, should we remove including |
I've encountered this error too, it completely prevents me from using schema stitching. It seems all Hasura needs to do is strip comments when comparing schemas. Maybe a quick fix? Hasura schema excerpt --
My remote schema --
Hasura error --
|
I'm having the same problem, but in my case I have no comments in my schema. The two enum definitions are exactly the same. Help with fixing this would be greatly appreciated! Right now my only solution seems to be to not use an enum. |
@tirumaraiselvan any update on this? |
I followed the tutorial to Add an Enum field from the docs. But when trying to add a Remote Schema with the enum in the type definition Hasura returns the following error:
Adding remote schema failed types: [ user_role_enum ] have mismatch with current graphql schema. HINT: Types must be same.
The type definitions are the same in both places
Steps to reproduce it:
Set the table as enum in the console
Added a Remote Schema with the following types definition:
The text was updated successfully, but these errors were encountered: