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

Cannot have more than one Root Field Namespace #8438

Closed
hongbo-miao opened this issue Apr 26, 2022 · 2 comments
Closed

Cannot have more than one Root Field Namespace #8438

hongbo-miao opened this issue Apr 26, 2022 · 2 comments
Assignees
Labels
c/remote-schemas Issues related to Remote Schemas k/bug Something isn't working

Comments

@hongbo-miao
Copy link

Version Information

Server Version: graphql-engine:v2.5.0.cli-migrations-v3

Environment

What is the expected behaviour?

I have two remote schemas. I try to set Root Field Namespace for both of them.

Keywords

Root Field Namespace

What is the current behaviour?

I can set first Root Field Namespace for first remote schema successfully.

However, when I set for second remote schema, it failed with error

Found conflicting definitions for "Query". The definition at "query_root.hm_graphql_server" differs from the the definition at "query_root.hm_dgraph".

Screenshots or Screencast

iShot2022-04-26_02 20 52

@hongbo-miao hongbo-miao added the k/bug Something isn't working label Apr 26, 2022
@hongbo-miao
Copy link
Author

hongbo-miao commented Apr 26, 2022

I tried to manually add two root_fields_namespace in the remote_schemas.yaml file and then load by metadata migration.

- name: hm-dgraph-schema
  definition:
    url: http://dgraph-dgraph-alpha.hm-dgraph:8080/graphql
    timeout_seconds: 60
    customization:
      root_fields_namespace: hm_dgraph # <--
    forward_client_headers: true
  comment: ""
- name: hm-graphql-server-schema
  definition:
    url: http://graphql-server-service.hm:31800/graphql
    timeout_seconds: 60
    customization:
      root_fields_namespace: hm_graphql_server # <--
    forward_client_headers: true
  comment: ""

The server will crash. So seems right now Hasura does not support adding namespaces for more than one remote schemas.

@rikinsk rikinsk added the c/remote-schemas Issues related to Remote Schemas label May 6, 2022
@paritosh-08
Copy link
Contributor

Closed via 25a027b

This issue was due to the conflicting root field type names, so HGE will now automatically prefix the root field type names with the root field namespace. Please note that you can change the root field type name by choosing appropriate type name mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/remote-schemas Issues related to Remote Schemas k/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants