---
source: crates/graphql-composition/tests/composition_tests.rs
expression: Federated SDL
input_file: crates/graphql-composition/tests/composition/custom_query_root/test.md
---
schema
@link(url: "https://specs.apollo.dev/link/v1.0")
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
@link(url: "https://specs.apollo.dev/inaccessible/v0.2", for: SECURITY)
{
query: Query
}
directive @join__unionMember(graph: join__Graph!, member: String!) on UNION
directive @join__implements(graph: join__Graph!, interface: String!) on OBJECT | INTERFACE
directive @join__graph(name: String!, url: String) on ENUM_VALUE
directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, overrideLabel: String) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
directive @join__type(graph: join__Graph, key: join__FieldSet, extension: Boolean = false, resolvable: Boolean = true, isInterfaceObject: Boolean = false) on SCALAR | OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT
directive @join__owner(graph: join__Graph!) on OBJECT
scalar join__FieldSet
type RecyclingCenter
@join__type(graph: HAZARDOUS_WASTE)
{
address: String
id: ID!
materialsAccepted: [String]
operatingHours: String
}
type HazardousWasteStats
@join__type(graph: HAZARDOUS_WASTE)
{
categoryBreakdown: [HazardousCategoryBreakdown]
city: String
totalHazardousWaste: Float
}
type HazardousCategoryBreakdown
@join__type(graph: HAZARDOUS_WASTE)
{
amount: Float
category: String
}
type CollectionPoint
@join__type(graph: WASTE_COLLECTION)
{
address: String
id: ID!
openingHours: String
type: String
}
type WasteStats
@join__type(graph: WASTE_COLLECTION)
{
city: String
totalWasteCollected: Float
wasteTypeBreakdown: [WasteTypeBreakdown]
}
type WasteTypeBreakdown
@join__type(graph: WASTE_COLLECTION)
{
amount: Float
type: String
}
type Query
{
hazardousWasteData(city: String!): HazardousWasteStats @join__field(graph: HAZARDOUS_WASTE)
recyclingCenters(city: String!): [RecyclingCenter] @join__field(graph: HAZARDOUS_WASTE)
wasteCollectionPoints(city: String!): [CollectionPoint] @join__field(graph: WASTE_COLLECTION)
wasteStatistics(city: String!): WasteStats @join__field(graph: WASTE_COLLECTION)
}
enum join__Graph
{
HAZARDOUS_WASTE @join__graph(name: "hazardous-waste", url: "http://example.com/hazardous-waste")
WASTE_COLLECTION @join__graph(name: "waste-collection", url: "http://example.com/waste-collection")
}