Skip to content
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

Remote schema permissions lead to conflicting data type name error #10558

Open
claudiuman opened this issue Oct 10, 2024 · 0 comments
Open

Remote schema permissions lead to conflicting data type name error #10558

claudiuman opened this issue Oct 10, 2024 · 0 comments
Labels
c/server Related to server k/bug Something isn't working v2-engine v2

Comments

@claudiuman
Copy link

claudiuman commented Oct 10, 2024

Version Information

Server Version:
2.44.0

Environment

Cloud

What is the current behaviour?

Whenever I try to grant permissions on remote schema, I get the following error because there is a conflict between datatypes on Action with data types on Remote schema (I renamed datatypes on remote-schema on graphql side, but Hasura doesn't seem to see that when granting permissions. Anyway, the admin role see's the changes, so it works there!
{1E0D4097-3998-4429-AD45-68957515385B}

What is the expected behaviour?

No error

How to reproduce the issue?

  1. Add an Action with some data type (SubmissionStatusEnum)
  2. Add a remote-schema with same datatype but renamed (SubmissionStatusEnum_gbo) (I used @graphql-mesh/transform-rename to rename on graphql-side, and yes, it does work, I was looking through the files and it is renamed in all of the places)
  3. Start the Hasura and add permissions
  4. You should see the error of conflict between the two datatypes

Screenshots or Screencast

Reloading schema: Payload
{BD8249D5-6A2E-421E-9A03-991371A56ACC}
Reloading schema: Response
{EA4F89DD-28C5-4AA4-B0FB-94E83C6C3571}

Please provide any traces or logs that could help here.

If after the above changes I try to restart the container, I get the following error
"Found conflicting definitions for GraphQL type 'SubmissionStatusEnum'. The definition at query_root.getMeterReadErroredSubmissions.readingSubmissions.meterReadingStatusType differs from the definitions at [query_root.backoffice.getErroredReadingSubmissions.GetErroredReadingSubmissionsResponse.readingSubmissions.meterReadingStatusType].\nFormer has definition:\nenum SubmissionStatusEnum {CONTACT_NEEDED \n ERROR \n PENDING \n REMOVED \n SUBMITTED \n}\nLatter has definition:\n\"The type of the meter reading submission\" \nenum SubmissionStatusEnum {CONTACTED \n ERROR \n MANUAL_SUBMISSION \n NO_ACTION_REQUIRED \n PENDING \n SUBMITTED \n}","path":"$","code":"unexpected"}

Any possible solutions/workarounds you're aware of?

Sometimes it works when I reload schema.... I do not understand why. Sometimes it fails when I run the Hasura container to apply metadata.

I know that we can use the namespace to rename all the types, but that has another unresolved Hasura issue #10485

Keywords

remote-schema agent permission issue, Found conflicting definitions for GraphQL type

@claudiuman claudiuman added the k/bug Something isn't working label Oct 10, 2024
@manasag manasag added c/server Related to server v2 and removed v2 labels Oct 15, 2024
@danieljharvey danieljharvey added the v2-engine label Oct 22, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/server Related to server k/bug Something isn't working v2-engine v2
Projects
None yet
Development

No branches or pull requests

3 participants