Schema { sources: { 1: SourceFile { path: "built_in.graphql", source_text: include_str!("built_in.graphql"), }, 24: SourceFile { path: "0022_merge_differing_fields_and_args.graphql", source_text: "interface Pet {\n name: String!\n}\n\nenum DogCommand {\n SIT\n HEEL\n}\n\nenum CatCommand {\n JUMP\n}\n\ntype Query {\n pet: Pet\n}\n\ntype Dog implements Pet {\n name: String!\n nickname: String!\n barkVolume: Int!\n doesKnowCommand(dogCommand: DogCommand!): Boolean!\n isAtLocation(x: Int, y: Int): Boolean!\n}\n\ntype Cat implements Pet {\n name: String!\n meowVolume: Int!\n doesKnowCommand(catCommand: CatCommand!): Boolean!\n}\n\nquery barkVolume {\n pet {\n ...safeDifferingFields\n }\n}\n\nquery doesKnowCommand {\n pet {\n ...safeDifferingArgs\n }\n}\n\nquery isAtLocation {\n pet {\n ...safeDifferingArgOrder\n }\n}\n\nfragment safeDifferingFields on Pet {\n ... on Dog {\n volume: barkVolume\n }\n ... on Cat {\n volume: meowVolume\n }\n}\n\nfragment safeDifferingArgs on Pet {\n ... on Dog {\n doesKnowCommand(dogCommand: SIT)\n }\n ... on Cat {\n doesKnowCommand(catCommand: JUMP)\n }\n}\n\nfragment safeDifferingArgOrder on Dog {\n isAtLocation(x: 0, y: 0)\n isAtLocation(y: 0, x: 0)\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"), "Pet": Interface( 0..33 @24 InterfaceType { description: None, name: "Pet", implements_interfaces: {}, directives: [], fields: { "name": Component { origin: Definition, node: 18..31 @24 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, }, }, ), "DogCommand": Enum( 35..67 @24 EnumType { description: None, name: "DogCommand", directives: [], values: { "SIT": Component { origin: Definition, node: 55..58 @24 EnumValueDefinition { description: None, value: "SIT", directives: [], }, }, "HEEL": Component { origin: Definition, node: 61..65 @24 EnumValueDefinition { description: None, value: "HEEL", directives: [], }, }, }, }, ), "CatCommand": Enum( 69..95 @24 EnumType { description: None, name: "CatCommand", directives: [], values: { "JUMP": Component { origin: Definition, node: 89..93 @24 EnumValueDefinition { description: None, value: "JUMP", directives: [], }, }, }, }, ), "Query": Object( 97..122 @24 ObjectType { description: None, name: "Query", implements_interfaces: {}, directives: [], fields: { "pet": Component { origin: Definition, node: 112..120 @24 FieldDefinition { description: None, name: "pet", arguments: [], ty: Named( "Pet", ), directives: [], }, }, }, }, ), "Dog": Object( 124..300 @24 ObjectType { description: None, name: "Dog", implements_interfaces: { ComponentName { origin: Definition, name: "Pet", }, }, directives: [], fields: { "name": Component { origin: Definition, node: 152..165 @24 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, "nickname": Component { origin: Definition, node: 168..185 @24 FieldDefinition { description: None, name: "nickname", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, "barkVolume": Component { origin: Definition, node: 188..204 @24 FieldDefinition { description: None, name: "barkVolume", arguments: [], ty: NonNullNamed( "Int", ), directives: [], }, }, "doesKnowCommand": Component { origin: Definition, node: 207..257 @24 FieldDefinition { description: None, name: "doesKnowCommand", arguments: [ 223..246 @24 InputValueDefinition { description: None, name: "dogCommand", ty: 235..246 @24 NonNullNamed( "DogCommand", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, }, "isAtLocation": Component { origin: Definition, node: 260..298 @24 FieldDefinition { description: None, name: "isAtLocation", arguments: [ 273..279 @24 InputValueDefinition { description: None, name: "x", ty: 276..279 @24 Named( "Int", ), default_value: None, directives: [], }, 281..287 @24 InputValueDefinition { description: None, name: "y", ty: 284..287 @24 Named( "Int", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, }, }, }, ), "Cat": Object( 302..417 @24 ObjectType { description: None, name: "Cat", implements_interfaces: { ComponentName { origin: Definition, name: "Pet", }, }, directives: [], fields: { "name": Component { origin: Definition, node: 330..343 @24 FieldDefinition { description: None, name: "name", arguments: [], ty: NonNullNamed( "String", ), directives: [], }, }, "meowVolume": Component { origin: Definition, node: 346..362 @24 FieldDefinition { description: None, name: "meowVolume", arguments: [], ty: NonNullNamed( "Int", ), directives: [], }, }, "doesKnowCommand": Component { origin: Definition, node: 365..415 @24 FieldDefinition { description: None, name: "doesKnowCommand", arguments: [ 381..404 @24 InputValueDefinition { description: None, name: "catCommand", ty: 393..404 @24 NonNullNamed( "CatCommand", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, }, }, }, ), }, } ExecutableDocument { sources: { 1: SourceFile { path: "built_in.graphql", source_text: include_str!("built_in.graphql"), }, 24: SourceFile { path: "0022_merge_differing_fields_and_args.graphql", source_text: "interface Pet {\n name: String!\n}\n\nenum DogCommand {\n SIT\n HEEL\n}\n\nenum CatCommand {\n JUMP\n}\n\ntype Query {\n pet: Pet\n}\n\ntype Dog implements Pet {\n name: String!\n nickname: String!\n barkVolume: Int!\n doesKnowCommand(dogCommand: DogCommand!): Boolean!\n isAtLocation(x: Int, y: Int): Boolean!\n}\n\ntype Cat implements Pet {\n name: String!\n meowVolume: Int!\n doesKnowCommand(catCommand: CatCommand!): Boolean!\n}\n\nquery barkVolume {\n pet {\n ...safeDifferingFields\n }\n}\n\nquery doesKnowCommand {\n pet {\n ...safeDifferingArgs\n }\n}\n\nquery isAtLocation {\n pet {\n ...safeDifferingArgOrder\n }\n}\n\nfragment safeDifferingFields on Pet {\n ... on Dog {\n volume: barkVolume\n }\n ... on Cat {\n volume: meowVolume\n }\n}\n\nfragment safeDifferingArgs on Pet {\n ... on Dog {\n doesKnowCommand(dogCommand: SIT)\n }\n ... on Cat {\n doesKnowCommand(catCommand: JUMP)\n }\n}\n\nfragment safeDifferingArgOrder on Dog {\n isAtLocation(x: 0, y: 0)\n isAtLocation(y: 0, x: 0)\n}\n", }, }, operations: OperationMap { anonymous: None, named: { "barkVolume": 419..478 @24 Operation { operation_type: Query, name: Some( "barkVolume", ), variables: [], directives: [], selection_set: SelectionSet { ty: "Query", selections: [ Field( 440..476 @24 Field { definition: 112..120 @24 FieldDefinition { description: None, name: "pet", arguments: [], ty: Named( "Pet", ), directives: [], }, alias: None, name: "pet", arguments: [], directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ FragmentSpread( 450..472 @24 FragmentSpread { fragment_name: "safeDifferingFields", directives: [], }, ), ], }, }, ), ], }, }, "doesKnowCommand": 480..542 @24 Operation { operation_type: Query, name: Some( "doesKnowCommand", ), variables: [], directives: [], selection_set: SelectionSet { ty: "Query", selections: [ Field( 506..540 @24 Field { definition: 112..120 @24 FieldDefinition { description: None, name: "pet", arguments: [], ty: Named( "Pet", ), directives: [], }, alias: None, name: "pet", arguments: [], directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ FragmentSpread( 516..536 @24 FragmentSpread { fragment_name: "safeDifferingArgs", directives: [], }, ), ], }, }, ), ], }, }, "isAtLocation": 544..607 @24 Operation { operation_type: Query, name: Some( "isAtLocation", ), variables: [], directives: [], selection_set: SelectionSet { ty: "Query", selections: [ Field( 567..605 @24 Field { definition: 112..120 @24 FieldDefinition { description: None, name: "pet", arguments: [], ty: Named( "Pet", ), directives: [], }, alias: None, name: "pet", arguments: [], directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ FragmentSpread( 577..601 @24 FragmentSpread { fragment_name: "safeDifferingArgOrder", directives: [], }, ), ], }, }, ), ], }, }, }, }, fragments: { "safeDifferingFields": 609..732 @24 Fragment { name: "safeDifferingFields", directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ InlineFragment( 649..688 @24 InlineFragment { type_condition: Some( "Dog", ), directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ Field( 666..684 @24 Field { definition: 188..204 @24 FieldDefinition { description: None, name: "barkVolume", arguments: [], ty: NonNullNamed( "Int", ), directives: [], }, alias: Some( "volume", ), name: "barkVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), InlineFragment( 691..730 @24 InlineFragment { type_condition: Some( "Cat", ), directives: [], selection_set: SelectionSet { ty: "Cat", selections: [ Field( 708..726 @24 Field { definition: 346..362 @24 FieldDefinition { description: None, name: "meowVolume", arguments: [], ty: NonNullNamed( "Int", ), directives: [], }, alias: Some( "volume", ), name: "meowVolume", arguments: [], directives: [], selection_set: SelectionSet { ty: "Int", selections: [], }, }, ), ], }, }, ), ], }, }, "safeDifferingArgs": 734..884 @24 Fragment { name: "safeDifferingArgs", directives: [], selection_set: SelectionSet { ty: "Pet", selections: [ InlineFragment( 772..825 @24 InlineFragment { type_condition: Some( "Dog", ), directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ Field( 789..821 @24 Field { definition: 207..257 @24 FieldDefinition { description: None, name: "doesKnowCommand", arguments: [ 223..246 @24 InputValueDefinition { description: None, name: "dogCommand", ty: 235..246 @24 NonNullNamed( "DogCommand", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, alias: None, name: "doesKnowCommand", arguments: [ 805..820 @24 Argument { name: "dogCommand", value: 817..820 @24 Enum( "SIT", ), }, ], directives: [], selection_set: SelectionSet { ty: "Boolean", selections: [], }, }, ), ], }, }, ), InlineFragment( 828..882 @24 InlineFragment { type_condition: Some( "Cat", ), directives: [], selection_set: SelectionSet { ty: "Cat", selections: [ Field( 845..878 @24 Field { definition: 365..415 @24 FieldDefinition { description: None, name: "doesKnowCommand", arguments: [ 381..404 @24 InputValueDefinition { description: None, name: "catCommand", ty: 393..404 @24 NonNullNamed( "CatCommand", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, alias: None, name: "doesKnowCommand", arguments: [ 861..877 @24 Argument { name: "catCommand", value: 873..877 @24 Enum( "JUMP", ), }, ], directives: [], selection_set: SelectionSet { ty: "Boolean", selections: [], }, }, ), ], }, }, ), ], }, }, "safeDifferingArgOrder": 886..981 @24 Fragment { name: "safeDifferingArgOrder", directives: [], selection_set: SelectionSet { ty: "Dog", selections: [ Field( 928..952 @24 Field { definition: 260..298 @24 FieldDefinition { description: None, name: "isAtLocation", arguments: [ 273..279 @24 InputValueDefinition { description: None, name: "x", ty: 276..279 @24 Named( "Int", ), default_value: None, directives: [], }, 281..287 @24 InputValueDefinition { description: None, name: "y", ty: 284..287 @24 Named( "Int", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, alias: None, name: "isAtLocation", arguments: [ 941..945 @24 Argument { name: "x", value: 944..945 @24 Int( 0, ), }, 947..951 @24 Argument { name: "y", value: 950..951 @24 Int( 0, ), }, ], directives: [], selection_set: SelectionSet { ty: "Boolean", selections: [], }, }, ), Field( 955..979 @24 Field { definition: 260..298 @24 FieldDefinition { description: None, name: "isAtLocation", arguments: [ 273..279 @24 InputValueDefinition { description: None, name: "x", ty: 276..279 @24 Named( "Int", ), default_value: None, directives: [], }, 281..287 @24 InputValueDefinition { description: None, name: "y", ty: 284..287 @24 Named( "Int", ), default_value: None, directives: [], }, ], ty: NonNullNamed( "Boolean", ), directives: [], }, alias: None, name: "isAtLocation", arguments: [ 968..972 @24 Argument { name: "y", value: 971..972 @24 Int( 0, ), }, 974..978 @24 Argument { name: "x", value: 977..978 @24 Int( 0, ), }, ], directives: [], selection_set: SelectionSet { ty: "Boolean", selections: [], }, }, ), ], }, }, }, }