hasura / hasura/graphql-engine
Similarly named types in different namespaces appear in namespace they're not supposed to
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Version Information
Server Version: v2.34.0
Environment
OSS
What is the current behaviour?
I have two remote schemas. Both remote schemas point to GraphQL endpoints of separate stacks we have on Contentstack.
1. cs-ikhlas-package
Type names are prefixed with Travel and namespace is package
2. cs-ikhlas-umrah
Type names are prefixed with Umrah and namespace is umrah
In both package and umrah, we have types named all_customer_manage_my_booking_page. One of the key differences between package's all_customer_manage_my_booking_page and umrah's all_customer_manage_my_booking_page is package's has a package_type field whilst umrah's does not have a package_type field.
In the remote schema preview on Hasura, I can see that the types are being shown accurately. However, they are wrong in Hasura's GraphQL schema.
When I remove umrah remote schema; correct
When I have both package and umrah remote schemas; incorrect
What is the expected behaviour?
Type for all_customer_manage_my_booking_page in package namespace should be TravelAllCustomerManageMyBookingPage and not UmrahAllCustomerManageMyBookingPage.
How to reproduce the issue?
- In two separate stacks on Contentstack, create types with same name but without having the same fields
- Add GraphQL endpoints of both stacks as remote schemas in Hasura
- Check explorer on Hasura whether the typing for the
all_types are accurate
Screenshots or Screencast
Shared above.
Please provide any traces or logs that could help here.
None of any relevance.
Any possible solutions/workarounds you're aware of?
None.
Keywords
remote schema, namespace
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with two Contentstack GraphQL endpoints configured as remote schemas, using the reported duplicate all_customer_manage_my_booking_page type and differing fields. Compare the remote schema previews with Hasura's generated GraphQL schema; done means each namespace resolves the type to its corresponding Travel or Umrah definition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100