Schema { sources: { 1: SourceFile { path: "built_in.graphql", source_text: include_str!("built_in.graphql"), }, 32: SourceFile { path: "0031_fragment_spread_possible.graphql", source_text: "interface Pet {\n name: String!\n}\n\ntype Dog implements Pet {\n name: String!\n barkVolume: Int\n}\n\ntype Cat implements Pet {\n name: String!\n meowVolume: Int\n}\n\nunion CatOrDog = Cat | Dog\n\ntype Human {\n pets: [Pet!]\n}\n\nunion DogOrHuman = Dog | Human\n\n# https://spec.graphql.org/October2021/#sec-Object-Spreads-In-Object-Scope\nfragment dogFragment on Dog {\n ... on Dog {\n barkVolume\n }\n}\n\n# https://spec.graphql.org/October2021/#sec-Abstract-Spreads-in-Object-Scope\nfragment petNameFragment on Pet {\n name\n}\n\nfragment interfaceWithinObjectFragment on Dog {\n ...petNameFragment\n}\n\nfragment catOrDogNameFragment on CatOrDog {\n ... on Cat {\n meowVolume\n }\n}\n\nfragment unionWithObjectFragment on Dog {\n ...catOrDogNameFragment\n}\n\n# https://spec.graphql.org/October2021/#sec-Object-Spreads-In-Abstract-Scope\nfragment petFragment on Pet {\n name\n ... on Dog {\n barkVolume\n }\n}\n\nfragment catOrDogFragment on CatOrDog {\n ... on Cat {\n meowVolume\n }\n}\n\n# https://spec.graphql.org/October2021/#sec-Abstract-Spreads-in-Abstract-Scope\nfragment unionWithInterface on Pet {\n ...dogOrHumanFragment\n}\n\nfragment dogOrHumanFragment on DogOrHuman {\n ... on Dog {\n barkVolume\n }\n}\n\n# https://spec.graphql.org/October2021/#sec-Abstract-Spreads-in-Abstract-Scope.Interface-Spreads-in-implemented-Interface-Scope\ninterface Node {\n id: ID!\n}\n\ninterface Resource implements Node {\n id: ID!\n url: String\n}\n\n# The validation for fragment spreads works on concrete types.\ntype ConcreteResource implements Resource & Node {\n id: ID!\n url: String\n}\n\nfragment interfaceWithInterface on Node {\n ...resourceFragment\n}\n\nfragment resourceFragment on Resource {\n url\n}\n\n# Make sure the above fragments are used\ntype Query {\n pet: Pet\n resource: Resource\n}\n\nquery UseAllFragments {\n pet {\n ... dogFragment\n ... interfaceWithinObjectFragment\n ... unionWithObjectFragment\n ... petFragment\n ... catOrDogFragment\n ... unionWithInterface\n }\n resource {\n ...interfaceWithInterface\n ... @skip(if: true) {\n urlInInlineFragment: url\n }\n }\n}\n", }, }, schema_definition: SchemaDefinition { description: None, directives: [], query: Some( ComponentName { origin: Definition, name: "Query", }, ), mutation: None, subscription: None, }, directive_definitions: { "skip": built_in_directive!("skip"), "include": built_in_directive!("include"), "deprecated": built_in_directive!("deprecated"), "specifiedBy": built_in_directive!("specifiedBy"), }, types: { "__Schema": built_in_type!("__Schema"), "__Type": built_in_type!("__Type"), "__TypeKind": built_in_type!("__TypeKind"), "__Field": built_in_type!("__Field"), "__InputValue": built_in_type!("__InputValue"), "__EnumValue": built_in_type!("__EnumValue"), "__Directive": built_in_type!("__Directive"), "__DirectiveLocation": built_in_type!("__DirectiveLocation"), "Int": built_in_type!("Int"), "String": built_in_type!("String"), "Boolean": built_in_type!("Boolean"), "ID": built_in_type!("ID"), "Pet": Interface( 0..33 @32 InterfaceType { description: None, name: "Pet", implements_interfaces: {}, directives: [], fields: { "name": Component { origin: Definition, node: 18..31 @32 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, }, }, ), "Dog": Object( 35..96 @32 ObjectType { description: None, name: "Dog", implements_interfaces: { ComponentName { origin: Definition, name: "Pet", }, }, directives: [], fields: { "name": Component { origin: Definition, node: 63..76 @32 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, "barkVolume": Component { origin: Definition, node: 79..94 @32 FieldDefinition { description: None, name: "barkVolume", arguments: [], ty: Named( "Int", ), directives: [], }, }, }, }, ), "Cat": Object( 98..159 @32 ObjectType { description: None, name: "Cat", implements_interfaces: { ComponentName { origin: Definition, name: "Pet", }, }, directives: [], fields: { "name": Component { origin: Definition, node: 126..139 @32 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, "meowVolume": Component { origin: Definition, node: 142..157 @32 FieldDefinition { description: None, name: "meowVolume", arguments: [], ty: Named( "Int", ), directives: [], }, }, }, }, ), "CatOrDog": Union( 161..187 @32 UnionType { description: None, name: "CatOrDog", directives: [], members: { ComponentName { origin: Definition, name: "Cat", }, ComponentName { origin: Definition, name: "Dog", }, }, }, ), "Human": Object( 189..218 @32 ObjectType { description: None, name: "Human", implements_interfaces: {}, directives: [], fields: { "pets": Component { origin: Definition, node: 204..216 @32 FieldDefinition { description: None, name: "pets", arguments: [], ty: List( NonNullNamed( "Pet", ), ), directives: [], }, }, }, }, ), "DogOrHuman": Union( 220..250 @32 UnionType { description: None, name: "DogOrHuman", directives: [], members: { ComponentName { origin: Definition, name: "Dog", }, ComponentName { origin: Definition, name: "Human", }, }, }, ), "Node": Interface( 1319..1347 @32 InterfaceType { description: None, name: "Node", implements_interfaces: {}, directives: [], fields: { "id": Component { origin: Definition, node: 1338..1345 @32 FieldDefinition { description: None, name: "id", arguments: [], ty: NonNullNamed( "ID", ), directives: [], }, }, }, }, ), "Resource": Interface( 1349..1411 @32 InterfaceType { description: None, name: "Resource", implements_interfaces: { ComponentName { origin: Definition, name: "Node", }, }, directives: [], fields: { "id": Component { origin: Definition, node: 1388..1395 @32 FieldDefinition { description: None, name: "id", arguments: [], ty: NonNullNamed( "ID", ), directives: [], }, }, "url": Component { origin: Definition, node: 1398..1409 @32 FieldDefinition { description: None, name: "url", arguments: [], ty: Named( "String", ), directives: [], }, }, }, }, ), "ConcreteResource": Object( 1476..1552 @32 ObjectType { description: None, name: "ConcreteResource", implements_interfaces: { ComponentName { origin: Definition, name: "Resource", }, ComponentName { origin: Definition, name: "Node", }, }, directives: [], fields: { "id": Component { origin: Definition, node: 1529..1536 @32 FieldDefinition { description: None, name: "id", arguments: [], ty: NonNullNamed( "ID", ), directives: [], }, }, "url": Component { origin: Definition, node: 1539..1550 @32 FieldDefinition { description: None, name: "url", arguments: [], ty: Named( "String", ), directives: [], }, }, }, }, ), "Query": Object( 1711..1757 @32 ObjectType { description: None, name: "Query", implements_interfaces: {}, directives: [], fields: { "pet": Component { origin: Definition, node: 1726..1734 @32 FieldDefinition { description: None, name: "pet", arguments: [], ty: Named( "Pet", ), directives: [], }, }, "resource": Component { origin: Definition, node: 1737..1755 @32 FieldDefinition { description: None, name: "resource", arguments: [], ty: Named( "Resource", ), directives: [], }, }, }, }, ), }, } ExecutableDocument { sources: { 1: SourceFile { path: "built_in.graphql", source_text: include_str!("built_in.graphql"), }, 32: SourceFile { path: "0031_fragment_spread_possible.graphql", source_text: "interface Pet {\n name: String!\n}\n\ntype Dog implements Pet {\n name: String!\n barkVolume: Int\n}\n\ntype Cat implements Pet {\n name: String!\n meowVolume: Int\n}\n\nunion CatOrDog = Cat | Dog\n\ntype Human {\n pets: [Pet!]\n}\n\nunion DogOrHuman = Dog | Human\n\n# https://spec.graphql.org/October2021/#sec-Object-Spreads-In-Object-Scope\nfragment dogFragment on Dog {\n ... on Dog {\n barkVolume\n }\n}\n\n# https://spec.graphql.org/October2021/#sec-Abstract-Spreads-in-Object-Scope\nfragment petNameFragment on Pet {\n name\n}\n\nfragment interfaceWithinObjectFragment on Dog {\n ...petNameFragment\n}\n\nfragment catOrDogNameFragment on CatOrDog {\n ... on Cat {\n meowVolume\n }\n}\n\nfragment unionWithObjectFragment on Dog {\n ...catOrDogNameFragment\n}\n\n# https://spec.graphql.org/October2021/#sec-Object-Spreads-In-Abstract-Scope\nfragment petFragment on Pet {\n name\n ... on Dog {\n barkVolume\n }\n}\n\nfragment catOrDogFragment on CatOrDog {\n ... on Cat {\n meowVolume\n }\n}\n\n# https://spec.graphql.org/October2021/#sec-Abstract-Spreads-in-Abstract-Scope\nfragment unionWithInterface on Pet {\n ...dogOrHumanFragment\n}\n\nfragment dogOrHumanFragment on DogOrHuman {\n ... on Dog {\n barkVolume\n }\n}\n\n# https://spec.graphql.org/October2021/#sec-Abstract-Spreads-in-Abstract-Scope.Interface-Spreads-in-implemented-Interface-Scope\ninterface Node {\n id: ID!\n}\n\ninterface Resource implements Node {\n id: ID!\n url: String\n}\n\n# The validation for fragment spreads works on concrete types.\ntype ConcreteResource implements Resource & Node {\n id: ID!\n url: String\n}\n\nfragment interfaceWithInterface on Node {\n ...resourceFragment\n}\n\nfragment resourceFragment on Resource {\n url\n}\n\n# Make sure the above fragments are used\ntype Query {\n pet: Pet\n resource: Resource\n}\n\nquery UseAllFragments {\n pet {\n ... dogFragment\n ... interfaceWithinObjectFragment\n ... unionWithObjectFragment\n ... petFragment\n ... catOrDogFragment\n ... unionWithInterface\n }\n resource {\n ...interfaceWithInterface\n ... @skip(if: true) {\n urlInInlineFragment: url\n }\n }\n}\n", }, }, operations: OperationMap { anonymous: None, named: { "UseAllFragments": 1759..2068 @32 Operation { operation_type: Query, name: Some( "UseAllFragments", ), variables: [], directives: [], selection_set: SelectionSet { ty: "Query", selections: [ Field( 1785..1956 @32 Field { definition: 1726..1734 @32 FieldDefinition { description: None, name: "pet", arguments: [], ty: Named( "Pet", ), directives: [], }, alias: None, name: "pet", arguments: [], directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ FragmentSpread( 1795..1810 @32 FragmentSpread { fragment_name: "dogFragment", directives: [], }, ), FragmentSpread( 1815..1848 @32 FragmentSpread { fragment_name: "interfaceWithinObjectFragment", directives: [], }, ), FragmentSpread( 1853..1880 @32 FragmentSpread { fragment_name: "unionWithObjectFragment", directives: [], }, ), FragmentSpread( 1885..1900 @32 FragmentSpread { fragment_name: "petFragment", directives: [], }, ), FragmentSpread( 1905..1925 @32 FragmentSpread { fragment_name: "catOrDogFragment", directives: [], }, ), FragmentSpread( 1930..1952 @32 FragmentSpread { fragment_name: "unionWithInterface", directives: [], }, ), ], }, }, ), Field( 1959..2066 @32 Field { definition: 1737..1755 @32 FieldDefinition { description: None, name: "resource", arguments: [], ty: Named( "Resource", ), directives: [], }, alias: None, name: "resource", arguments: [], directives: [], selection_set: SelectionSet { ty: "Resource", selections: [ FragmentSpread( 1974..1999 @32 FragmentSpread { fragment_name: "interfaceWithInterface", directives: [], }, ), InlineFragment( 2004..2062 @32 InlineFragment { type_condition: None, directives: [ 2008..2023 @32 Directive { name: "skip", arguments: [ 2014..2022 @32 Argument { name: "if", value: 2018..2022 @32 Boolean( true, ), }, ], }, ], selection_set: SelectionSet { ty: "Resource", selections: [ Field( 2032..2056 @32 Field { definition: 1398..1409 @32 FieldDefinition { description: None, name: "url", arguments: [], ty: Named( "String", ), directives: [], }, alias: Some( "urlInInlineFragment", ), name: "url", arguments: [], directives: [], selection_set: SelectionSet { ty: "String", selections: [], }, }, ), ], }, }, ), ], }, }, ), ], }, }, }, }, fragments: { "dogFragment": 327..392 @32 Fragment { name: "dogFragment", directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ InlineFragment( 359..390 @32 InlineFragment { type_condition: Some( "Dog", ), directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ Field( 376..386 @32 Field { definition: 79..94 @32 FieldDefinition { description: None, name: "barkVolume", arguments: [], ty: Named( "Int", ), directives: [], }, alias: None, name: "barkVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), ], }, }, "petNameFragment": 471..513 @32 Fragment { name: "petNameFragment", directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ Field( 507..511 @32 Field { definition: 18..31 @32 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, alias: None, name: "name", arguments: [], directives: [], selection_set: SelectionSet { ty: "String", selections: [], }, }, ), ], }, }, "interfaceWithinObjectFragment": 515..585 @32 Fragment { name: "interfaceWithinObjectFragment", directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ FragmentSpread( 565..583 @32 FragmentSpread { fragment_name: "petNameFragment", directives: [], }, ), ], }, }, "catOrDogNameFragment": 587..666 @32 Fragment { name: "catOrDogNameFragment", directives: [], selection_set: SelectionSet { ty: "CatOrDog", selections: [ InlineFragment( 633..664 @32 InlineFragment { type_condition: Some( "Cat", ), directives: [], selection_set: SelectionSet { ty: "Cat", selections: [ Field( 650..660 @32 Field { definition: 142..157 @32 FieldDefinition { description: None, name: "meowVolume", arguments: [], ty: Named( "Int", ), directives: [], }, alias: None, name: "meowVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), ], }, }, "unionWithObjectFragment": 668..737 @32 Fragment { name: "unionWithObjectFragment", directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ FragmentSpread( 712..735 @32 FragmentSpread { fragment_name: "catOrDogNameFragment", directives: [], }, ), ], }, }, "petFragment": 816..888 @32 Fragment { name: "petFragment", directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ Field( 848..852 @32 Field { definition: 18..31 @32 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, alias: None, name: "name", arguments: [], directives: [], selection_set: SelectionSet { ty: "String", selections: [], }, }, ), InlineFragment( 855..886 @32 InlineFragment { type_condition: Some( "Dog", ), directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ Field( 872..882 @32 Field { definition: 79..94 @32 FieldDefinition { description: None, name: "barkVolume", arguments: [], ty: Named( "Int", ), directives: [], }, alias: None, name: "barkVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), ], }, }, "catOrDogFragment": 890..965 @32 Fragment { name: "catOrDogFragment", directives: [], selection_set: SelectionSet { ty: "CatOrDog", selections: [ InlineFragment( 932..963 @32 InlineFragment { type_condition: Some( "Cat", ), directives: [], selection_set: SelectionSet { ty: "Cat", selections: [ Field( 949..959 @32 Field { definition: 142..157 @32 FieldDefinition { description: None, name: "meowVolume", arguments: [], ty: Named( "Int", ), directives: [], }, alias: None, name: "meowVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), ], }, }, "unionWithInterface": 1046..1108 @32 Fragment { name: "unionWithInterface", directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ FragmentSpread( 1085..1106 @32 FragmentSpread { fragment_name: "dogOrHumanFragment", directives: [], }, ), ], }, }, "dogOrHumanFragment": 1110..1189 @32 Fragment { name: "dogOrHumanFragment", directives: [], selection_set: SelectionSet { ty: "DogOrHuman", selections: [ InlineFragment( 1156..1187 @32 InlineFragment { type_condition: Some( "Dog", ), directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ Field( 1173..1183 @32 Field { definition: 79..94 @32 FieldDefinition { description: None, name: "barkVolume", arguments: [], ty: Named( "Int", ), directives: [], }, alias: None, name: "barkVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), ], }, }, "interfaceWithInterface": 1554..1619 @32 Fragment { name: "interfaceWithInterface", directives: [], selection_set: SelectionSet { ty: "Node", selections: [ FragmentSpread( 1598..1617 @32 FragmentSpread { fragment_name: "resourceFragment", directives: [], }, ), ], }, }, "resourceFragment": 1621..1668 @32 Fragment { name: "resourceFragment", directives: [], selection_set: SelectionSet { ty: "Resource", selections: [ Field( 1663..1666 @32 Field { definition: 1398..1409 @32 FieldDefinition { description: None, name: "url", arguments: [], ty: Named( "String", ), directives: [], }, alias: None, name: "url", arguments: [], directives: [], selection_set: SelectionSet { ty: "String", selections: [], }, }, ), ], }, }, }, }