Using GraphQL Fragment on multiple types
问题 If I have a set of field that is common to multiple types in my GraphQL schema, is there a way to do something like this? type Address { line1: String city: String state: String zip: String } fragment NameAndAddress on Person, Business { name: String address: Address } type Business { ...NameAndAddress hours: String } type Customer { ...NameAndAddress customerSince: Date } 回答1: Fragments are only used on the client-side when making requests -- they can't be used inside your schema. GraphQL