0
type Book @key(fields: "id language country name desc") @extends {
  id: ID! @external
  language: String! @external
  country: String @external
  name: String! @external
  description: String! @external
  information: MetaInformation @requires(fields: "id language country name desc ")
}

here I extended book with information property and other ones are coming from Book graph, I want to know how I can set default value for country? It can be null in Book graph but it requires for fetching information property or somehow I should handle it in datafetcher.

E Behrangi
  • 41
  • 1
  • 9

1 Answers1

0

It sounds like you need to use an extended entity instead of an extended type, there are more details on this on the Apollo docs here: https://www.apollographql.com/docs/federation/v1/entities/#extending-entities

A similar thread related to extending types in GQL's spec: https://stackoverflow.com/a/56204966/9281567

Kyle O'Brien
  • 150
  • 10