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.

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.