Non-shareable field "PageInfo.endCursor" is resolved from multiple subgraphs
Non-shareable field "PageInfo.hasNextPage" is resolved from multiple subgraphs
Non-shareable field "PageInfo.hasPreviousPage" is resolved from multiple subgraphs
Non-shareable field "PageInfo.startCursor" is resolved from multiple subgraphs
When using relay.connection
, type PageInfo
is automatically generated and part of the schema. There should be an easier way to mark these automated/built-in types as @shareable
or possibly with other federated schema directives.
"""Information to aid in pagination."""
type PageInfo {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: String
"""When paginating forwards, the cursor to continue."""
endCursor: String
}
Currently using a workaround before writing the schema to file:
generated_schema = print_schema(schema).strip()
generated_schema = generated_schema.replace(
"type PageInfo ", "type PageInfo @shareable "
)
generated_schema = generated_schema.replace(
'["@key"]', '["@key", "@shareable"]'
)
with open("schema.graphql", "w+") as file:
file.write(generated_schema)
which writes out the federated directive
schema @link(url: "https://specs.apollo.dev/federation/v2.3", import: ["@key", "@shareable"]) {
and the type
type PageInfo @shareable { ... }
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too