hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.13k stars 2.76k forks source link

Reloading remote schema does not pick up newly added enum values #9688

Open kevinmichaelchen opened 1 year ago

kevinmichaelchen commented 1 year ago

Version Information

Server Version: v2.23.0 CLI Version (for CLI related issue): v2.23.0

Environment

EE

What is the current behaviour?

I've observed that the hasura metadata reload CLI does not pick up on newly added enum values in remote schemas.

What is the expected behaviour?

The expected behavior is for reload to pick up on new enum values.

How to reproduce the issue?

  1. Add a new enum value to a remote schema
  2. Restart the remote schema w/ its new SDL
  3. Run the hasura metadata reload command
  4. Observe no changes to remote_schemas.yaml

Screenshots or Screencast

Please provide any traces or logs that could help here.

Any possible solutions/workarounds you're aware of?

The workaround is to go into the Remote Schema's Permissions tab, modify the permissions (e.g., uncheck some random input or type) and save, and then re-modify the permissions (re-checking what you previously unchecked).

Keywords

Reload, reloading, remote schema, new enum value

hpsmatheus commented 1 year ago

I have the same issue on version v2.25.1 and none of the workaraounds work for me. I see there was an issue open for this before and it was closed even though a lot of people seems to keep facing the same issue. It is so frustrating that there's been years of the same issue! Adding new value to enum should be a pretty simple task but it is actually causing a lot of trouble and requiring me to do non-sense workarounds in my code!

cezarneaga commented 4 months ago

Hi there, this is still an issue today. on hasura 2.40.0.

will try discord and see if anyone can pick this up. Best, Cezar

ts-hems commented 1 month ago

Hi there,

I'm experiencing the same issue in version 2.42.0. It was working with the previous added enum, but when we added a new enum in a different schema, it's not being picked up and is causing an error in the fetch query.

Is there any solution? @hpsmatheus, has this been resolved yet?

Thank you Hems Patel Tracksuit