You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm playing around with schema federation in HotChocolate 13(.0.5).
Essentially I have my gateway service and one or more domain services. Everything works fine so far but what I really would like to achieve somehow is to "namespace" all of the subgraphs.
Let's say I have a domain service "BookStore" with the following query type:
[QueryType]
public static class Query
{
public static Book GetBook()
=> new Book("C# in depth.", new Author("Jon Skeet"));
}
In the resulting distributed graph I can query the book's title like this:
query {
book{
title
}
}
What I would like to be able to is to move the whole subgraph to a "bookstore" object (not sure about the terminology here sry) in order for the query to look like this:
query {
bookstore {
book{
title
}
}
}
This way I also could avoid naming clashes between multiple domain services very easily but I have no idea how to do this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey guys,
I'm playing around with schema federation in HotChocolate 13(.0.5).
Essentially I have my gateway service and one or more domain services. Everything works fine so far but what I really would like to achieve somehow is to "namespace" all of the subgraphs.
Let's say I have a domain service "BookStore" with the following query type:
In the resulting distributed graph I can query the book's title like this:
What I would like to be able to is to move the whole subgraph to a "bookstore" object (not sure about the terminology here sry) in order for the query to look like this:
This way I also could avoid naming clashes between multiple domain services very easily but I have no idea how to do this.
Is there some way to do this?
Beta Was this translation helpful? Give feedback.
All reactions