error SATISFIABILITY_ERROR when check the schema

error SATISFIABILITY_ERROR when check the schema


0

I tried to use Federation in my supergraph.
I have 2 microservices, each one with the own schema:
1. first subgraph has:

type User @key(fields: id) @guard {
      id: ID!
      firstname: String!
   }

2. second subgraph has:

type GraphUnion {
   id: ID!
   user_id: Int
   text: String
   user: User! @hasOne 
}
type User @extends @key(fields: "id") {
    id: ID! @external
}

I make a Type(app/graphql/types) in the second microservice where I extend the User:

final class User
{
    public function __invoke($representation): array
    {
        return [
            '__typename' => 'User',
            'id' => 23
        ];
    }
}

When I use rover subgraph check
I received the following

 SATISFIABILITY_ERROR: The following supergraph API query:
    {
      graphUnion {
        user {
          firstname
        }
      }
    }
    cannot be satisfied by the subgraphs because:
    - from subgraph "...":
      - cannot find field "User.firstname".
      - cannot move to subgraph "users", which has field "User.firstname", because type "User" has no @key defined in subgraph "users".

Could someone help me?

I tried to do all the steps from documentation from lighthouse … also from Apollo, but didn’t work

Share
Improve this question

New contributor

user22083246 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 2 more related questions


Show fewer related questions

0

Reset to default



Leave a Reply

Your email address will not be published. Required fields are marked *