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

Add routing support for generic node resolver #1595

Open
saerdnaer opened this issue Feb 14, 2025 · 1 comment
Open

Add routing support for generic node resolver #1595

saerdnaer opened this issue Feb 14, 2025 · 1 comment
Labels
enhancement New feature or request internally-reviewed The issue has been reviewed internally.

Comments

@saerdnaer
Copy link

Component(s)

No response

Is your feature request related to a problem? Please describe.

Some schema design specifications e.g. Relay require a generic resolver node(id: ID!): Node which, in a federated subgraph forwards the request to the corresponding routing-url / subgraph server e.g. via a domain/entity prefix in ID.

For example, a ID like foo:cms:123 must be forwarded to the CMS subgraph as node(id: ID): Node, while foo:coral:comment:123 should go to the comments subgraph, foo:epg:broadcast:123 to the EPG domain, and so on.

type Query {
  node(id: ID!): Node
  …
}

interface Node {
  __typename: String!
  id: ID!
}

type Page implements Node {
  id: ID!
  title: String!
  …
}

type Article implements Node {
  id: ID!
  title: String!
  …
}

type Comment implements Node {
  id: ID!
  title: String!
  …
}

Describe the solution you'd like

Some method/hook inside of cosmo-router to define the logic how queries to the node(id: ID!) should be resolved

Describe alternatives you've considered

One could deploy an additional subgraph in on own service which could proxy the requests to the corresponding subgraph.

Additional context

Additional resources

@saerdnaer saerdnaer added the enhancement New feature or request label Feb 14, 2025
Copy link

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@JivusAyrus JivusAyrus added the internally-reviewed The issue has been reviewed internally. label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants