---
source: crates/graphql-composition/tests/composition_tests.rs
expression: Federated SDL
input_file: crates/graphql-composition/tests/composition/composed_directives_basic/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)
@link(url: "https://specs.birds.co.uk/link/birds", import: ["@pelagic"])
{
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__enumValue(graph: join__Graph!) on ENUM_VALUE
directive @join__owner(graph: join__Graph!) on OBJECT
scalar DateTime
scalar join__FieldSet
type Bird
@fieldMarks(plumage: "juvenile")
@fieldMarks(plumage: "adult")
@join__type(graph: BIRDWATCH_BASIC)
@join__type(graph: OBSERVATIONS)
@join__type(graph: SIGHTINGS)
{
id: ID!
location: String! @tag(name: "locationService") @tag(name: "b") @tag(name: "a")
name: String!
notes: String @deprecated(reason: "Field is obsolete due to new data model.")
observedAt: DateTime! @deprecated(reason: "Use UNIX timestamps instead as customary in bird watching")
species: String!
}
type BirdObservation
@join__type(graph: OBSERVATIONS)
{
bird: Bird!
observationID: ID!
observerDetails: ObserverDetails!
timeOfObservation: DateTime!
}
type ObserverDetails
@join__type(graph: OBSERVATIONS)
{
membershipNumber: String
name: String!
observerType: ObserverType!
}
type BirdSighting
@deprecated(reason: "we haven't seen any birds in a while :(")
@join__type(graph: SIGHTINGS, key: "sightingID")
{
bird: Bird! @pelagic
observer: String!
sightingID: ID!
weatherConditions: String
}
type Query
{
bird(id: ID!): Bird @join__field(graph: BIRDWATCH_BASIC)
birdObservation(observationID: ID!): BirdObservation @join__field(graph: OBSERVATIONS)
birdObservations(filters: BirdObservationFilters): [BirdObservation] @join__field(graph: OBSERVATIONS)
birdSighting(sightingID: ID!, private: Boolean @deprecated): BirdSighting @join__field(graph: SIGHTINGS)
birdSightings: [BirdSighting] @join__field(graph: SIGHTINGS)
birds: [Bird] @join__field(graph: BIRDWATCH_BASIC)
}
enum ObserverType
@join__type(graph: OBSERVATIONS)
{
AMATEUR @join__enumValue(graph: OBSERVATIONS)
SEMIPROFESSIONAL @deprecated(reason: "No such thing as semiprofessionals") @join__enumValue(graph: OBSERVATIONS)
PROFESSIONAL @join__enumValue(graph: OBSERVATIONS)
}
enum join__Graph
{
BIRDWATCH_BASIC @join__graph(name: "birdwatch-basic", url: "http://example.com/birdwatch-basic")
OBSERVATIONS @join__graph(name: "observations", url: "http://example.com/observations")
SIGHTINGS @join__graph(name: "sightings", url: "http://example.com/sightings")
}
input BirdObservationFilters
@join__type(graph: OBSERVATIONS)
{
observedAt: DateTime @deprecated(reason: "UNIX timestamps instead, as usual in bird watching")
observerType: ObserverType
observerName: String
first: Int
}