Skip to content

misleading composition hints when using @inaccessible #2398

@dariuszkuc

Description

@dariuszkuc

Given a simple schema definition

type ProductDimension @shareable {
  size: String
  weight: Float
  unit: String @inaccessible
}

We are getting misleading composition hints when other subgraphs do not include unit field:

rover HINT: [INCONSISTENT_OBJECT_VALUE_TYPE_FIELD]: Field "ProductDimension.unit" of non-entity object type "ProductDimension" is defined in some but not all subgraphs that define "ProductDimension": "ProductDimension.unit" is defined in subgraph "products" but not in subgraph "inventory".

Inaccessible fields may to be present in other subgraphs as they could be used for private keys, etc.


Repro available in apollographql/apollo-federation-subgraph-compatibility repo (apollo-server and federation-jvm implementations were updated to v2.3 tests).

To run tests, execute following make target from root dir:

make test subgraph=apollo-server

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions