Product
Hot Chocolate
Version
16.1.2
Link to minimal reproduction
|
protected override void Configure(IObjectTypeDescriptor<PageCursor> descriptor) |
Steps to reproduce
- Set up GraphQL with
.AddApolloFederation():
builder.Services.AddGraphQLServer()
.AddApolloFederation()
.AddTypes()
.AddFiltering()
.AddSorting()
.AddPagingArguments();
- Create query with paging
[QueryType]
public static partial class EmployeeResolver
{
[UseConnection]
public static async Task<PageConnection<Employee>> GetEmployeeByPageTest(AppDbContext db, QueryContext<Employee> query, PagingArguments args)
{
return await db.Employees.With(query).ToPageAsync(args);
}
}
- Run multiple Subgraphs like this on an Supergraph using ApolloFederation
You get this error:
error[E029]: Encountered 2 build errors while trying to build a supergraph.
Caused by:
INVALID_FIELD_SHARING: Non-shareable field "PageCursor.page" is resolved from multiple subgraphs: it is resolved from subgraphs "x" and "y" and defined as non-shareable in all of them
INVALID_FIELD_SHARING: Non-shareable field "PageCursor.cursor" is resolved from multiple subgraphs: it is resolved from subgraphs "x" and "y" and defined as non-shareable in all of them
It seems like this was partially solved once before:
Issue: #7292
Pull Request: #7480
What is expected?
Supergraph compiles and runs without any additional configuration as seen here
What is actually happening?
Supergraph fails to compile due to non-shareable fields.
Relevant log output
error[E029]: Encountered 2 build errors while trying to build a supergraph.
Caused by:
INVALID_FIELD_SHARING: Non-shareable field "PageCursor.page" is resolved from multiple subgraphs: it is resolved from subgraphs "x" and "y" and defined as non-shareable in all of them
INVALID_FIELD_SHARING: Non-shareable field "PageCursor.cursor" is resolved from multiple subgraphs: it is resolved from subgraphs "x" and "y" and defined as non-shareable in all of them
Additional context
No response
Product
Hot Chocolate
Version
16.1.2
Link to minimal reproduction
graphql-platform/src/HotChocolate/Core/src/Types.CursorPagination.Extensions/PageCursorType.cs
Line 8 in dee2704
Steps to reproduce
.AddApolloFederation():You get this error:
It seems like this was partially solved once before:
Issue: #7292
Pull Request: #7480
What is expected?
Supergraph compiles and runs without any additional configuration as seen here
What is actually happening?
Supergraph fails to compile due to non-shareable fields.
Relevant log output
Additional context
No response