diff --git a/compiler/crates/graphql-syntax/src/node/type_system.rs b/compiler/crates/graphql-syntax/src/node/type_system.rs index 2030106becc14..bfe0332181e52 100644 --- a/compiler/crates/graphql-syntax/src/node/type_system.rs +++ b/compiler/crates/graphql-syntax/src/node/type_system.rs @@ -109,6 +109,7 @@ impl fmt::Display for TypeSystemDefinition { repeatable, locations, description, + hack_source, }) => write_directive_definition_helper( f, &name.value, @@ -116,6 +117,7 @@ impl fmt::Display for TypeSystemDefinition { repeatable, locations, description, + hack_source, ), TypeSystemDefinition::InputObjectTypeDefinition(InputObjectTypeDefinition { name, @@ -299,6 +301,7 @@ pub struct DirectiveDefinition { pub repeatable: bool, pub locations: Vec, pub description: Option, + pub hack_source: Option, } #[derive(PartialEq, Eq, Ord, PartialOrd, Hash, Debug, Clone, Copy)] @@ -399,6 +402,7 @@ pub struct FieldDefinition { pub arguments: Option>, pub directives: Vec, pub description: Option, + pub hack_source: Option, } impl fmt::Display for FieldDefinition { @@ -548,6 +552,7 @@ fn write_directive_definition_helper( _repeatable: &bool, locations: &[DirectiveLocation], _description: &Option, + _hack_source: &Option, ) -> fmt::Result { write!(f, "directive @{}", name)?; if let Some(arguments) = arguments.as_ref() { diff --git a/compiler/crates/graphql-syntax/src/parser.rs b/compiler/crates/graphql-syntax/src/parser.rs index c5d5375d1ee33..9fe5049c08244 100644 --- a/compiler/crates/graphql-syntax/src/parser.rs +++ b/compiler/crates/graphql-syntax/src/parser.rs @@ -372,6 +372,7 @@ impl<'a> Parser<'a> { /// [] TypeSystemExtension fn parse_type_system_definition(&mut self) -> ParseResult { let description = self.parse_optional_description(); + let hack_source = self.parse_optional_hack_source(); let token = self.peek(); if token.kind != TokenKind::Identifier { // TODO @@ -401,7 +402,7 @@ impl<'a> Parser<'a> { self.parse_input_object_type_definition()?, )), "directive" => Ok(TypeSystemDefinition::DirectiveDefinition( - self.parse_directive_definition(description)?, + self.parse_directive_definition(description, hack_source)?, )), "extend" => self.parse_type_system_extension(), token_str => { @@ -793,6 +794,7 @@ impl<'a> Parser<'a> { fn parse_directive_definition( &mut self, description: Option, + hack_source: Option, ) -> ParseResult { self.parse_keyword("directive")?; self.parse_kind(TokenKind::At)?; @@ -811,6 +813,7 @@ impl<'a> Parser<'a> { repeatable, locations, description, + hack_source, }) } @@ -910,6 +913,27 @@ impl<'a> Parser<'a> { } } + /** + * hack_source : StringValue + */ + fn parse_optional_hack_source(&mut self) -> Option { + match self.peek_token_kind() { + TokenKind::StringLiteral => { + let token = self.parse_token(); + let source = self.source(&token); + let value = source[1..source.len() - 1].to_string().intern(); + Some(StringNode { token, value }) + } + TokenKind::BlockStringLiteral => { + let token = self.parse_token(); + let source = self.source(&token); + let value = clean_block_string_literal(source).intern(); + Some(StringNode { token, value }) + } + _ => None, + } + } + /** * FieldsDefinition : { FieldDefinition+ } */ @@ -927,6 +951,7 @@ impl<'a> Parser<'a> { */ fn parse_field_definition_impl(&mut self) -> ParseResult { let description = self.parse_optional_description(); + let hack_source = self.parse_optional_hack_source(); let name = self.parse_identifier()?; let arguments = self.parse_argument_defs()?; self.parse_kind(TokenKind::Colon)?; @@ -938,6 +963,7 @@ impl<'a> Parser<'a> { arguments, directives, description, + hack_source, }) } diff --git a/compiler/crates/graphql-syntax/tests/parse_document/fixtures/mixed.expected b/compiler/crates/graphql-syntax/tests/parse_document/fixtures/mixed.expected index cdf68e4cfecd4..84e81f0b21856 100644 --- a/compiler/crates/graphql-syntax/tests/parse_document/fixtures/mixed.expected +++ b/compiler/crates/graphql-syntax/tests/parse_document/fixtures/mixed.expected @@ -84,6 +84,7 @@ Document { arguments: None, directives: [], description: None, + hack_source: None, }, ], end: Token { diff --git a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/directive_description.expected b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/directive_description.expected index 7450859cb230f..97cd58443bddf 100644 --- a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/directive_description.expected +++ b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/directive_description.expected @@ -31,6 +31,7 @@ SchemaDocument { value: "My Directive", }, ), + hack_source: None, }, ), ], diff --git a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/field_description.expected b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/field_description.expected index ee1272027c2b7..ac3c71d6d93d3 100644 --- a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/field_description.expected +++ b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/field_description.expected @@ -82,6 +82,7 @@ SchemaDocument { value: "Single line field description", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -115,6 +116,7 @@ SchemaDocument { value: "Block field description", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -148,6 +150,7 @@ SchemaDocument { value: "Multiline block field description which is so long\nthat it spans onto a second line.", }, ), + hack_source: None, }, ], end: Token { @@ -210,6 +213,7 @@ SchemaDocument { value: "Single line extended field description", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -243,6 +247,7 @@ SchemaDocument { value: "Block field description", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -276,6 +281,7 @@ SchemaDocument { value: "Multiline block field description which is so long\nthat it spans onto a second line.", }, ), + hack_source: None, }, ], end: Token { diff --git a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/schema_kitchen_sink.expected b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/schema_kitchen_sink.expected index 7428119aa527d..ab0f2a2e72b09 100644 --- a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/schema_kitchen_sink.expected +++ b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/schema_kitchen_sink.expected @@ -278,6 +278,7 @@ SchemaDocument { value: "Description of the `one` field.", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -358,6 +359,7 @@ SchemaDocument { value: "This is a description of the `two` field.", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -453,6 +455,7 @@ SchemaDocument { value: "This is a description of the `three` field.", }, ), + hack_source: None, }, FieldDefinition { name: Identifier { @@ -526,6 +529,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -636,6 +640,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -739,6 +744,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -809,6 +815,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, ], end: Token { @@ -1000,6 +1007,7 @@ SchemaDocument { }, ], description: None, + hack_source: None, }, ], end: Token { @@ -1120,6 +1128,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, ], end: Token { @@ -1206,6 +1215,7 @@ SchemaDocument { arguments: None, directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -1279,6 +1289,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, ], end: Token { @@ -1422,6 +1433,7 @@ SchemaDocument { }, ], description: None, + hack_source: None, }, ], end: Token { @@ -1547,6 +1559,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, ], end: Token { @@ -1650,6 +1663,7 @@ SchemaDocument { arguments: None, directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -1722,6 +1736,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -1795,6 +1810,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, ], end: Token { @@ -2714,6 +2730,7 @@ SchemaDocument { value: "This is a description of the `@skip` directive", }, ), + hack_source: None, }, ), DirectiveDefinition( @@ -2781,6 +2798,7 @@ SchemaDocument { InlineFragment, ], description: None, + hack_source: None, }, ), DirectiveDefinition( @@ -2848,6 +2866,7 @@ SchemaDocument { InlineFragment, ], description: None, + hack_source: None, }, ), DirectiveDefinition( @@ -2914,6 +2933,7 @@ SchemaDocument { Interface, ], description: None, + hack_source: None, }, ), SchemaExtension( diff --git a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/type_definition.expected b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/type_definition.expected index cee96673b8409..128c1560798a4 100644 --- a/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/type_definition.expected +++ b/compiler/crates/graphql-syntax/tests/parse_schema_document/fixtures/type_definition.expected @@ -76,6 +76,7 @@ SchemaDocument { arguments: None, directives: [], description: None, + hack_source: None, }, ], end: Token { @@ -211,6 +212,7 @@ SchemaDocument { arguments: None, directives: [], description: None, + hack_source: None, }, FieldDefinition { name: Identifier { @@ -283,6 +285,7 @@ SchemaDocument { ), directives: [], description: None, + hack_source: None, }, ], end: Token { diff --git a/compiler/crates/relay-docblock/src/docblock_ir.rs b/compiler/crates/relay-docblock/src/docblock_ir.rs index 626d33f0499b4..27c9fa2211c3b 100644 --- a/compiler/crates/relay-docblock/src/docblock_ir.rs +++ b/compiler/crates/relay-docblock/src/docblock_ir.rs @@ -92,6 +92,7 @@ pub(crate) fn parse_docblock_ir( &mut fields, definitions_in_file, description, + None, // This might be necessary for field hack source links docblock_location, unpopulated_ir_field, parse_options, @@ -113,6 +114,7 @@ pub(crate) fn parse_docblock_ir( Some(weak_field) => DocblockIr::WeakObjectType(parse_weak_object_ir( &mut fields, description, + None, // This might be necessary for field hack source links docblock_location, populated_ir_field, weak_field, @@ -141,6 +143,7 @@ fn parse_relay_resolver_ir( fields: &mut HashMap, definitions_in_file: Option<&Vec>, description: Option>, + hack_source: Option>, location: Location, _resolver_field: UnpopulatedIrField, parse_options: &ParseOptions<'_>, @@ -200,6 +203,7 @@ fn parse_relay_resolver_ir( root_fragment: root_fragment .map(|root_fragment| root_fragment.value.map(FragmentDefinitionName)), description, + hack_source, deprecated: fields.remove(&AllowedFieldName::DeprecatedField), location, field: field_definition_stub, @@ -238,6 +242,7 @@ fn parse_strong_object_ir( fn parse_weak_object_ir( fields: &mut HashMap, description: Option>, + hack_source: Option>, location: Location, relay_resolver_field: PopulatedIrField, _weak_field: UnpopulatedIrField, @@ -249,6 +254,7 @@ fn parse_weak_object_ir( type_name: identifier, rhs_location: relay_resolver_field.value.location, description, + hack_source, deprecated: fields.remove(&AllowedFieldName::DeprecatedField), location, }) diff --git a/compiler/crates/relay-docblock/src/ir.rs b/compiler/crates/relay-docblock/src/ir.rs index 02963c53986d4..28a365848b885 100644 --- a/compiler/crates/relay-docblock/src/ir.rs +++ b/compiler/crates/relay-docblock/src/ir.rs @@ -423,6 +423,7 @@ trait ResolverTypeDefinitionIr: ResolverIr { fn field_name(&self) -> &Identifier; fn field_arguments(&self) -> Option<&List>; fn description(&self) -> Option; + fn hack_source(&self) -> Option; fn fragment_arguments(&self) -> Option<&Vec>; /// Build recursive object/interface extensions to add this field to all @@ -588,6 +589,7 @@ trait ResolverTypeDefinitionIr: ResolverIr { arguments: args, directives: self.directives(object, schema_info), description: self.description(), + hack_source: self.hack_source(), }]) } @@ -719,6 +721,10 @@ impl ResolverTypeDefinitionIr for TerseRelayResolverIr { fn fragment_arguments(&self) -> Option<&Vec> { self.fragment_arguments.as_ref() } + + fn hack_source(&self) -> Option { + self.field.hack_source.clone() + } } #[derive(Debug, Clone, PartialEq)] @@ -728,6 +734,7 @@ pub struct RelayResolverIr { pub root_fragment: Option>, pub output_type: Option, pub description: Option>, + pub hack_source: Option>, pub deprecated: Option, pub live: Option, pub location: Location, @@ -881,6 +888,10 @@ impl ResolverTypeDefinitionIr for RelayResolverIr { fn fragment_arguments(&self) -> Option<&Vec> { self.fragment_arguments.as_ref() } + + fn hack_source(&self) -> Option { + self.hack_source.map(as_string_node) + } } /// Relay Resolver ID representing a "model" of a strong object @@ -1048,11 +1059,13 @@ impl ResolverIr for StrongObjectIr { arguments: None, directives: vec![], description: None, + hack_source: None, }, generate_model_instance_field( schema_info, RESOLVER_VALUE_SCALAR_NAME.0, None, + None, self.directives(None, schema_info), self.location(), ), @@ -1117,6 +1130,7 @@ pub struct WeakObjectIr { /// It is the location of a longer string, e.g. "Foo implements Bar". pub rhs_location: Location, pub description: Option>, + pub hack_source: Option>, pub deprecated: Option, pub location: Location, } @@ -1167,6 +1181,7 @@ impl WeakObjectIr { schema_info, self.model_type_name(), self.description.map(as_string_node), + self.hack_source.map(as_string_node), vec![], self.location(), )])), @@ -1362,6 +1377,7 @@ fn generate_model_instance_field( schema_info: SchemaInfo<'_, '_>, type_name: StringKey, description: Option, + hack_source: Option, mut directives: Vec, location: Location, ) -> FieldDefinition { @@ -1391,5 +1407,6 @@ fn generate_model_instance_field( arguments: None, directives, description, + hack_source, } } diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated-no-description.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated-no-description.expected index dd91f28cb6b5e..5cb40b69cff06 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated-no-description.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated-no-description.expected @@ -72,6 +72,7 @@ RelayResolver( ), ), description: None, + hack_source: None, deprecated: Some( UnpopulatedIrField( UnpopulatedIrField { diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated.expected index 82c8597ab7e3b..2a26f9d962aea 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-deprecated.expected @@ -72,6 +72,7 @@ RelayResolver( ), ), description: None, + hack_source: None, deprecated: Some( PopulatedIrField( PopulatedIrField { diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-live.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-live.expected index 735edd35ae2f8..1db46a0bec645 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-live.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-live.expected @@ -72,6 +72,7 @@ RelayResolver( ), ), description: None, + hack_source: None, deprecated: None, live: Some( UnpopulatedIrField { diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-named-export.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-named-export.expected index b9bc8692d7d03..a5b751ee4f63e 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-named-export.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-named-export.expected @@ -62,6 +62,7 @@ RelayResolver( item: "\nThe user's favorite page! They probably clicked something in the UI\nto tell us that it was their favorite page and then we put that in a\ndatabase or something. Then we got that info out again and put it out\nagain. Anyway, I'm rambling now. Its a page that the user likes. A lot.", }, ), + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver-named-export.js:0:393, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-args.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-args.expected index f1382907480cd..d198f643cc874 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-args.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-args.expected @@ -62,6 +62,7 @@ RelayResolver( item: "\nThe user's favorite page! They probably clicked something in the UI\nto tell us that it was their favorite page and then we put that in a\ndatabase or something. Then we got that info out again and put it out\nagain. Anyway, I'm rambling now. Its a page that the user likes. A lot.", }, ), + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver-with-args.js:0:393, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-and-fragment-args.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-and-fragment-args.expected index 3ff9dd363ef2e..d6979524c5ae3 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-and-fragment-args.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-and-fragment-args.expected @@ -100,6 +100,7 @@ RelayResolver( ), output_type: None, description: None, + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver-with-field-and-fragment-args.js:0:118, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-args.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-args.expected index 2865797fa8053..c13328caafe10 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-args.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-field-args.expected @@ -100,6 +100,7 @@ RelayResolver( ), output_type: None, description: None, + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver-with-field-args.js:0:118, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-fragment.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-fragment.expected index 418c4fa297caf..4d4c0bbb1d633 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-fragment.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-fragment.expected @@ -52,6 +52,7 @@ RelayResolver( ), output_type: None, description: None, + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver-with-fragment.js:0:94, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-output-type.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-output-type.expected index 399baa04f143b..b7d1dbd5e8092 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-output-type.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver-with-output-type.expected @@ -83,6 +83,7 @@ RelayResolver( item: "\nThe user's favorite page! They probably clicked something in the UI\nto tell us that it was their favorite page and then we put that in a\ndatabase or something. Then we got that info out again and put it out\nagain. Anyway, I'm rambling now. Its a page that the user likes. A lot.", }, ), + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver-with-output-type.js:0:419, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver.expected index 3db03f82fc685..ae1ebf99d911e 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/relay-resolver.expected @@ -81,6 +81,7 @@ RelayResolver( item: "\nThe user's favorite page! They probably clicked something in the UI\nto tell us that it was their favorite page and then we put that in a\ndatabase or something. Then we got that info out again and put it out\nagain. Anyway, I'm rambling now. Its a page that the user likes. A lot.", }, ), + hack_source: None, deprecated: None, live: None, location: /path/to/test/fixture/relay-resolver.js:0:409, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver-non-nullable-list-item.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver-non-nullable-list-item.expected index e376745bd6b24..f4e2d88efa7ca 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver-non-nullable-list-item.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver-non-nullable-list-item.expected @@ -59,6 +59,7 @@ TerseRelayResolver( arguments: None, directives: [], description: None, + hack_source: None, }, type_: WithLocation { location: /path/to/test/fixture/terse-relay-resolver-non-nullable-list-item.js:20:24, diff --git a/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver.expected b/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver.expected index ce6facb35197a..68b407e345f32 100644 --- a/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver.expected +++ b/compiler/crates/relay-docblock/tests/parse/fixtures/terse-relay-resolver.expected @@ -47,6 +47,7 @@ TerseRelayResolver( arguments: None, directives: [], description: None, + hack_source: None, }, type_: WithLocation { location: /path/to/test/fixture/terse-relay-resolver.js:20:24, diff --git a/compiler/crates/relay-lsp/src/hover/with_resolution_path.rs b/compiler/crates/relay-lsp/src/hover/with_resolution_path.rs index 9d96f68cce176..4ddb4139e35ac 100644 --- a/compiler/crates/relay-lsp/src/hover/with_resolution_path.rs +++ b/compiler/crates/relay-lsp/src/hover/with_resolution_path.rs @@ -678,17 +678,24 @@ fn get_scalar_or_linked_field_hover_content( type_path.push(field_type_name); - hover_contents.push(MarkedString::String(format!( - "Type: **{}**", - content_consumer_type.render_text_with_params( - &schema.get_type_string(&field.type_), - &GraphQLSchemaExplorerParams { - path: type_path, - schema_name: schema_name.lookup(), - filter: None, - } - ) - ))); + let type_name = content_consumer_type.render_text_with_params( + &schema.get_type_string(&field.type_), + &GraphQLSchemaExplorerParams { + path: type_path, + schema_name: schema_name.lookup(), + filter: None, + }, + ); + + if let Some(field_type_hack_source) = schema_documentation.get_hack_source(field_type_name) { + hover_contents.push(MarkedString::String(format!( + "Type: [**{}**](https://www.internalfb.com/code/symbol/www/php/{})", + type_name, field_type_hack_source, + ))); + } else { + hover_contents.push(MarkedString::String(format!("Type: **{}**", type_name,))); + } + if let Some(type_description) = schema_documentation.get_type_description(field_type_name) { hover_contents.push(MarkedString::String(type_description.to_string())); } @@ -743,6 +750,19 @@ fn get_scalar_or_linked_field_hover_content( }; hover_contents.push(MarkedString::String(msg.to_string())) } + + if let Some(field_hack_source) = + schema_documentation.get_field_hack_source(parent_type_name, field.name.item.lookup()) + { + // replace instances of "::" with "/" to avoid breaking codex links + let field_hack_source_url_path = str::replace(field_hack_source, "::", "/"); + + hover_contents.push(MarkedString::String(format!( + "View [**{}**](https://www.internalfb.com/code/symbol/www/php/{}) in Codex", + field_hack_source, field_hack_source_url_path, + ))); + } + Some(hover_contents) } @@ -797,14 +817,21 @@ fn on_hover_inline_fragment( ) )); + let mut hover_contents: Vec = vec![first_line]; + if let Some(description) = description { - Some(HoverContents::Array(vec![ - first_line, - MarkedString::String(description.to_string()), - ])) - } else { - Some(HoverContents::Scalar(first_line)) + hover_contents.push(MarkedString::String(description.to_string())); + } + + if let Some(hack_source) = schema_documentation.get_hack_source(inline_fragment_condition) { + let codex_link = MarkedString::String(format!( + "View [**{}**](https://www.internalfb.com/code/symbol/www/php/{}) in Codex", + hack_source, hack_source, + )); + hover_contents.push(codex_link); } + + Some(HoverContents::Array(hover_contents)) } fn on_hover_fragment_spread<'a>( diff --git a/compiler/crates/schema-documentation/src/combined_schema_documentation.rs b/compiler/crates/schema-documentation/src/combined_schema_documentation.rs index 0070eef1acb52..cf6bfbe563af2 100644 --- a/compiler/crates/schema-documentation/src/combined_schema_documentation.rs +++ b/compiler/crates/schema-documentation/src/combined_schema_documentation.rs @@ -43,6 +43,16 @@ impl SchemaDocum .get_field_argument_description(type_name, field_name, argument_name) }) } + fn get_hack_source(&self, type_name: &str) -> Option<&str> { + self.primary + .get_hack_source(type_name) + .or_else(|| self.secondary.get_hack_source(type_name)) + } + fn get_field_hack_source(&self, type_name: &str, field_name: &str) -> Option<&str> { + self.primary + .get_field_hack_source(type_name, field_name) + .or_else(|| self.secondary.get_field_hack_source(type_name, field_name)) + } } impl<'a, TPrimary: SchemaDocumentation, TSecondary: SchemaDocumentation> diff --git a/compiler/crates/schema-documentation/src/lib.rs b/compiler/crates/schema-documentation/src/lib.rs index 1dcc4a7d12f2b..36775fa95d3c4 100644 --- a/compiler/crates/schema-documentation/src/lib.rs +++ b/compiler/crates/schema-documentation/src/lib.rs @@ -31,6 +31,12 @@ pub trait SchemaDocumentation: Send + Sync { ) -> Option<&str> { None } + fn get_hack_source(&self, _type_name: &str) -> Option<&str> { + None + } + fn get_field_hack_source(&self, _type_name: &str, _field_name: &str) -> Option<&str> { + None + } } // This can probably be implemented more generically for AsRef @@ -52,6 +58,12 @@ impl SchemaDocumentation for Arc Option<&str> { + self.as_ref().get_hack_source(type_name) + } + fn get_field_hack_source(&self, type_name: &str, field_name: &str) -> Option<&str> { + self.as_ref().get_field_hack_source(type_name, field_name) + } } impl SchemaDocumentation @@ -76,4 +88,11 @@ impl SchemaDocumentation self.as_ref() .and_then(|s| s.get_field_argument_description(type_name, field_name, argument_name)) } + fn get_hack_source(&self, type_name: &str) -> Option<&str> { + self.as_ref().and_then(|s| s.get_hack_source(type_name)) + } + fn get_field_hack_source(&self, type_name: &str, field_name: &str) -> Option<&str> { + self.as_ref() + .and_then(|s| s.get_field_hack_source(type_name, field_name)) + } } diff --git a/compiler/crates/schema-documentation/src/sdl_schema_impl.rs b/compiler/crates/schema-documentation/src/sdl_schema_impl.rs index bf509c9195987..67edb9b6da693 100644 --- a/compiler/crates/schema-documentation/src/sdl_schema_impl.rs +++ b/compiler/crates/schema-documentation/src/sdl_schema_impl.rs @@ -49,6 +49,20 @@ impl SchemaDocumentation for SDLSchema { .and_then(|argument| argument.description) .map(|string_key| string_key.lookup()) } + + fn get_hack_source(&self, type_name: &str) -> Option<&str> { + self.get_type(type_name.intern()) + .and_then(|type_| get_hack_source_from_type(type_, self)) + .map(|string_key| string_key.lookup()) + } + + fn get_field_hack_source(&self, type_name: &str, field_name: &str) -> Option<&str> { + let field_name_string_key = field_name.intern(); + self.get_type(type_name.intern()) + .and_then(|type_| get_field_from_type(type_, self, field_name_string_key)) + .and_then(|field| field.hack_source) + .map(|string_key| string_key.lookup()) + } } fn get_description_from_type(type_: Type, schema: &SDLSchema) -> Option { @@ -81,3 +95,14 @@ fn get_field_from_type(type_: Type, schema: &SDLSchema, field_name: StringKey) - } }) } + +fn get_hack_source_from_type(type_: Type, schema: &SDLSchema) -> Option { + match type_ { + Type::Enum(id) => schema.enum_(id).hack_source, + Type::InputObject(id) => schema.input_object(id).hack_source, + Type::Interface(id) => schema.interface(id).hack_source, + Type::Object(id) => schema.object(id).hack_source, + Type::Scalar(id) => schema.scalar(id).hack_source, + Type::Union(id) => schema.union(id).hack_source, + } +} diff --git a/compiler/crates/schema/src/definitions/interface.rs b/compiler/crates/schema/src/definitions/interface.rs index 284b35f2b48b8..87913d6f7c92b 100644 --- a/compiler/crates/schema/src/definitions/interface.rs +++ b/compiler/crates/schema/src/definitions/interface.rs @@ -27,6 +27,7 @@ pub struct Interface { pub directives: Vec, pub interfaces: Vec, pub description: Option, + pub hack_source: Option, } impl Interface { @@ -227,6 +228,7 @@ mod test { directives: vec![], interfaces: vec![], description: None, + hack_source: None, } } diff --git a/compiler/crates/schema/src/definitions/mod.rs b/compiler/crates/schema/src/definitions/mod.rs index 3b1eeae2dbc2a..c2b38a1bf7815 100644 --- a/compiler/crates/schema/src/definitions/mod.rs +++ b/compiler/crates/schema/src/definitions/mod.rs @@ -304,6 +304,7 @@ pub struct Directive { pub repeatable: bool, pub is_extension: bool, pub description: Option, + pub hack_source: Option, } impl Named for Directive { @@ -319,6 +320,7 @@ pub struct Scalar { pub is_extension: bool, pub directives: Vec, pub description: Option, + pub hack_source: Option, } #[derive(Clone, Debug, Eq, PartialEq, Hash)] @@ -329,6 +331,7 @@ pub struct Object { pub interfaces: Vec, pub directives: Vec, pub description: Option, + pub hack_source: Option, } #[derive(Clone, Debug, Eq, PartialEq, Hash)] @@ -337,6 +340,7 @@ pub struct InputObject { pub fields: ArgumentDefinitions, pub directives: Vec, pub description: Option, + pub hack_source: Option, } #[derive(Clone, Debug, Eq, PartialEq, Hash)] @@ -346,6 +350,7 @@ pub struct Enum { pub values: Vec, pub directives: Vec, pub description: Option, + pub hack_source: Option, } #[derive(Clone, Debug, Eq, PartialEq, Hash)] @@ -355,6 +360,7 @@ pub struct Union { pub members: Vec, pub directives: Vec, pub description: Option, + pub hack_source: Option, } #[derive(Clone, Debug, Eq, PartialEq, Hash)] @@ -370,6 +376,7 @@ pub struct Field { /// a single parent type. pub parent_type: Option, pub description: Option, + pub hack_source: Option, } pub struct Deprecation { diff --git a/compiler/crates/schema/src/flatbuffer/mod.rs b/compiler/crates/schema/src/flatbuffer/mod.rs index 7ac9a6f7fe152..bf17cb96f00bb 100644 --- a/compiler/crates/schema/src/flatbuffer/mod.rs +++ b/compiler/crates/schema/src/flatbuffer/mod.rs @@ -175,6 +175,7 @@ impl<'fb> FlatBufferSchema<'fb> { locations, repeatable: directive.repeatable(), description: None, + hack_source: None, }; Some(parsed_directive) } @@ -223,6 +224,7 @@ impl<'fb> FlatBufferSchema<'fb> { is_extension: scalar.is_extension(), directives: self.parse_directive_values(scalar.directives()?)?, description: None, + hack_source: None, }; Some(parsed_scalar) } @@ -235,6 +237,7 @@ impl<'fb> FlatBufferSchema<'fb> { fields: self.parse_arguments(input_object.fields()?)?, directives: self.parse_directive_values(input_object.directives()?)?, description: None, + hack_source: None, }; Some(parsed_input_object) } @@ -248,6 +251,7 @@ impl<'fb> FlatBufferSchema<'fb> { values: self.parse_enum_values(enum_.values()?)?, directives: self.parse_directive_values(enum_.directives()?)?, description: None, + hack_source: None, }; Some(parsed_enum) } @@ -262,6 +266,7 @@ impl<'fb> FlatBufferSchema<'fb> { interfaces: object.interfaces()?.iter().map(InterfaceID).collect(), directives: self.parse_directive_values(object.directives()?)?, description: None, + hack_source: None, }; Some(parsed_object) } @@ -279,6 +284,7 @@ impl<'fb> FlatBufferSchema<'fb> { directives: self.parse_directive_values(interface.directives()?)?, interfaces: wrap_ids(interface.interfaces(), InterfaceID), description: None, + hack_source: None, }; Some(parsed_interface) } @@ -292,6 +298,7 @@ impl<'fb> FlatBufferSchema<'fb> { members: wrap_ids(union.members(), ObjectID), directives: self.parse_directive_values(union.directives()?)?, description: None, + hack_source: None, }; Some(parsed_union) } @@ -306,6 +313,7 @@ impl<'fb> FlatBufferSchema<'fb> { directives: self.parse_directive_values(field.directives()?)?, parent_type: self.get_type(self.get_fbtype_name(&field.parent_type()?)), description: None, + hack_source: None, }; Some(parsed_field) } diff --git a/compiler/crates/schema/src/flatbuffer/wrapper.rs b/compiler/crates/schema/src/flatbuffer/wrapper.rs index d139773ae4973..70503dbfa150a 100644 --- a/compiler/crates/schema/src/flatbuffer/wrapper.rs +++ b/compiler/crates/schema/src/flatbuffer/wrapper.rs @@ -124,6 +124,7 @@ impl SchemaWrapper { directives: Vec::new(), parent_type: None, description: None, + hack_source: None, }); result.fields.get(CLIENTID_FIELD_ID, || -> Field { Field { @@ -136,6 +137,7 @@ impl SchemaWrapper { directives: Vec::new(), parent_type: None, description: Some(*CLIENT_ID_DESCRIPTION), + hack_source: None, } }); result.fields.get(STRONGID_FIELD_ID, || Field { @@ -146,6 +148,7 @@ impl SchemaWrapper { directives: Vec::new(), parent_type: None, description: Some(*TYPENAME_DESCRIPTION), + hack_source: None, }); result.fields.get(FETCH_TOKEN_FIELD_ID, || Field { name: WithLocation::generated(result.fetch_token_field_name), @@ -157,6 +160,7 @@ impl SchemaWrapper { directives: Vec::new(), parent_type: None, description: None, + hack_source: None, }); result.fields.get(IS_FULFILLED_FIELD_ID, || Field { name: WithLocation::generated(result.is_fulfilled_field_name), @@ -176,6 +180,7 @@ impl SchemaWrapper { directives: Vec::new(), parent_type: None, description: None, + hack_source: None, }); result.unchecked_argument_type_sentinel = Some(TypeReference::Named( diff --git a/compiler/crates/schema/src/in_memory/mod.rs b/compiler/crates/schema/src/in_memory/mod.rs index 4ef965a6aedb9..c9979ce31e71e 100644 --- a/compiler/crates/schema/src/in_memory/mod.rs +++ b/compiler/crates/schema/src/in_memory/mod.rs @@ -930,6 +930,7 @@ impl InMemorySchema { directives: Vec::new(), parent_type: None, description: Some(*TYPENAME_DESCRIPTION), + hack_source: None, }); } @@ -945,6 +946,7 @@ impl InMemorySchema { directives: Vec::new(), parent_type: None, description: None, + hack_source: None, }); } @@ -960,6 +962,7 @@ impl InMemorySchema { directives: Vec::new(), parent_type: None, description: Some(*CLIENT_ID_DESCRIPTION), + hack_source: None, }); } @@ -975,6 +978,7 @@ impl InMemorySchema { directives: Vec::new(), parent_type: None, description: None, + hack_source: None, }); } @@ -999,6 +1003,7 @@ impl InMemorySchema { directives: Vec::new(), parent_type: None, description: None, + hack_source: None, }); } @@ -1174,6 +1179,7 @@ impl InMemorySchema { repeatable, locations, description, + hack_source, }) => { if self.directives.contains_key(&DirectiveName(name.value)) { let str_name = name.value.lookup(); @@ -1195,6 +1201,7 @@ impl InMemorySchema { repeatable: *repeatable, is_extension, description: description.as_ref().map(|node| node.value), + hack_source: hack_source.as_ref().map(|node| node.value), }, ); } @@ -1230,6 +1237,7 @@ impl InMemorySchema { interfaces, directives, description: None, + hack_source: None, }); } TypeSystemDefinition::InterfaceTypeDefinition(InterfaceTypeDefinition { @@ -1266,6 +1274,7 @@ impl InMemorySchema { directives, interfaces, description: None, + hack_source: None, }); } TypeSystemDefinition::UnionTypeDefinition(UnionTypeDefinition { @@ -1284,6 +1293,7 @@ impl InMemorySchema { members, directives, description: None, + hack_source: None, }); } TypeSystemDefinition::InputObjectTypeDefinition(InputObjectTypeDefinition { @@ -1302,6 +1312,7 @@ impl InMemorySchema { fields, directives, description: None, + hack_source: None, }); } TypeSystemDefinition::EnumTypeDefinition(EnumTypeDefinition { @@ -1331,6 +1342,7 @@ impl InMemorySchema { values, directives, description: None, + hack_source: None, }); } TypeSystemDefinition::ScalarTypeDefinition(ScalarTypeDefinition { @@ -1346,6 +1358,7 @@ impl InMemorySchema { is_extension, directives, description: None, + hack_source: None, }) } TypeSystemDefinition::ObjectTypeExtension(ObjectTypeExtension { @@ -1503,6 +1516,10 @@ impl InMemorySchema { let type_ = self.build_type_reference(&field_def.type_, field_location_key)?; let directives = self.build_directive_values(&field_def.directives); let description = field_def.description.as_ref().map(|desc| desc.value); + let hack_source = field_def + .hack_source + .as_ref() + .map(|hack_source| hack_source.value); Ok(self.build_field(Field { name: WithLocation::new( Location::new(field_location_key, field_def.name.span), @@ -1514,6 +1531,7 @@ impl InMemorySchema { directives, parent_type, description, + hack_source, })) }) .collect() @@ -1544,6 +1562,10 @@ impl InMemorySchema { let directives = self.build_directive_values(&field_def.directives); let type_ = self.build_type_reference(&field_def.type_, source_location_key)?; let description = field_def.description.as_ref().map(|desc| desc.value); + let hack_source = field_def + .hack_source + .as_ref() + .map(|hack_source| hack_source.value); field_ids.push(self.build_field(Field { name: WithLocation::new(field_location, field_name), is_extension: true, @@ -1552,6 +1574,7 @@ impl InMemorySchema { directives, parent_type, description, + hack_source, })); } Ok(field_ids) @@ -1728,6 +1751,7 @@ mod tests { directives: vec![], interfaces: vec![], description: None, + hack_source: None, }) .unwrap(); diff --git a/compiler/crates/schema/tests/build_schema/fixtures/directive-on-arg-def.expected b/compiler/crates/schema/tests/build_schema/fixtures/directive-on-arg-def.expected index a9300a7ce7014..a19f95f72df19 100644 --- a/compiler/crates/schema/tests/build_schema/fixtures/directive-on-arg-def.expected +++ b/compiler/crates/schema/tests/build_schema/fixtures/directive-on-arg-def.expected @@ -47,6 +47,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -80,6 +81,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -108,6 +110,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -120,6 +123,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] type_map: { @@ -156,6 +160,7 @@ Text Schema:Schema { ], directives: [], description: None, + hack_source: None, }, ] fields: [ @@ -174,6 +179,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -192,6 +198,7 @@ Text Schema:Schema { description: Some( "This object's GraphQL type. Provided by GraphQL type name introspection.", ), + hack_source: None, }, Field { name: WithLocation { @@ -208,6 +215,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -226,6 +234,7 @@ Text Schema:Schema { description: Some( "Relay's cache key for this object.", ), + hack_source: None, }, Field { name: WithLocation { @@ -240,6 +249,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -270,6 +280,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, ] input_objects: [] @@ -289,6 +300,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -302,6 +314,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -313,6 +326,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -324,6 +338,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -335,6 +350,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -346,6 +362,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [] @@ -380,6 +397,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -406,6 +424,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -434,6 +453,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -446,6 +466,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] enums: [ @@ -473,6 +494,7 @@ enums: [ ], directives: [], description: None, + hack_source: None, }, ] fields: [ @@ -491,6 +513,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, ] input_objects: [] @@ -510,6 +533,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -523,6 +547,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -534,6 +559,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -545,6 +571,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -556,6 +583,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -567,6 +595,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [] diff --git a/compiler/crates/schema/tests/build_schema/fixtures/directives-for-external-types.expected b/compiler/crates/schema/tests/build_schema/fixtures/directives-for-external-types.expected index 85acd1375f868..baab633a0d344 100644 --- a/compiler/crates/schema/tests/build_schema/fixtures/directives-for-external-types.expected +++ b/compiler/crates/schema/tests/build_schema/fixtures/directives-for-external-types.expected @@ -86,6 +86,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -110,6 +111,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -138,6 +140,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -173,6 +176,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -201,6 +205,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -232,6 +237,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] type_map: { @@ -277,6 +283,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -305,6 +312,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -321,6 +329,7 @@ Text Schema:Schema { Interface(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -337,6 +346,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -389,6 +399,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -417,6 +428,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -433,6 +445,7 @@ Text Schema:Schema { Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -449,6 +462,7 @@ Text Schema:Schema { Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -465,6 +479,7 @@ Text Schema:Schema { Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -481,6 +496,7 @@ Text Schema:Schema { Object(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -497,6 +513,7 @@ Text Schema:Schema { Object(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -515,6 +532,7 @@ Text Schema:Schema { description: Some( "This object's GraphQL type. Provided by GraphQL type name introspection.", ), + hack_source: None, }, Field { name: WithLocation { @@ -531,6 +549,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -549,6 +568,7 @@ Text Schema:Schema { description: Some( "Relay's cache key for this object.", ), + hack_source: None, }, Field { name: WithLocation { @@ -563,6 +583,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -593,6 +614,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, ] input_objects: [ @@ -656,6 +678,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, ] interfaces: [ @@ -713,6 +736,7 @@ Text Schema:Schema { ], interfaces: [], description: None, + hack_source: None, }, ] objects: [ @@ -731,6 +755,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -772,6 +797,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -789,6 +815,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -862,6 +889,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, ] scalars: [ @@ -875,6 +903,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -886,6 +915,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -897,6 +927,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -908,6 +939,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -919,6 +951,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -966,6 +999,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, ] unions: [ @@ -1017,6 +1051,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, ] } @@ -1057,6 +1092,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -1081,6 +1117,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -1109,6 +1146,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -1144,6 +1182,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -1172,6 +1211,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -1203,6 +1243,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] enums: [] @@ -1222,6 +1263,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1238,6 +1280,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1254,6 +1297,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1282,6 +1326,7 @@ fields: [ Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1310,6 +1355,7 @@ fields: [ Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1326,6 +1372,7 @@ fields: [ Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1378,6 +1425,7 @@ fields: [ Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1406,6 +1454,7 @@ fields: [ Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1422,6 +1471,7 @@ fields: [ Interface(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1438,6 +1488,7 @@ fields: [ Object(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1454,6 +1505,7 @@ fields: [ Object(3), ), description: None, + hack_source: None, }, ] input_objects: [ @@ -1517,6 +1569,7 @@ input_objects: [ }, ], description: None, + hack_source: None, }, ] interfaces: [ @@ -1574,6 +1627,7 @@ interfaces: [ ], interfaces: [], description: None, + hack_source: None, }, ] objects: [ @@ -1593,6 +1647,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -1609,6 +1664,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -1650,6 +1706,7 @@ objects: [ }, ], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -1723,6 +1780,7 @@ objects: [ }, ], description: None, + hack_source: None, }, ] scalars: [ @@ -1736,6 +1794,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1747,6 +1806,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1794,6 +1854,7 @@ scalars: [ }, ], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1805,6 +1866,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1816,6 +1878,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [ @@ -1867,6 +1930,7 @@ unions: [ }, ], description: None, + hack_source: None, }, ] } diff --git a/compiler/crates/schema/tests/build_schema/fixtures/field-descriptions.expected b/compiler/crates/schema/tests/build_schema/fixtures/field-descriptions.expected index 76eadf503504f..2e17be6d232ad 100644 --- a/compiler/crates/schema/tests/build_schema/fixtures/field-descriptions.expected +++ b/compiler/crates/schema/tests/build_schema/fixtures/field-descriptions.expected @@ -69,6 +69,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -97,6 +98,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] type_map: { @@ -125,6 +127,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -143,6 +146,7 @@ Text Schema:Schema { description: Some( "Single line field description", ), + hack_source: None, }, Field { name: WithLocation { @@ -161,6 +165,7 @@ Text Schema:Schema { description: Some( "Block field description", ), + hack_source: None, }, Field { name: WithLocation { @@ -179,6 +184,7 @@ Text Schema:Schema { description: Some( "Multiline block field description which is so long\nthat it spans onto a second line.", ), + hack_source: None, }, Field { name: WithLocation { @@ -197,6 +203,7 @@ Text Schema:Schema { description: Some( "Single line extended field description", ), + hack_source: None, }, Field { name: WithLocation { @@ -215,6 +222,7 @@ Text Schema:Schema { description: Some( "Block field description", ), + hack_source: None, }, Field { name: WithLocation { @@ -233,6 +241,7 @@ Text Schema:Schema { description: Some( "Multiline block field description which is so long\nthat it spans onto a second line.", ), + hack_source: None, }, Field { name: WithLocation { @@ -251,6 +260,7 @@ Text Schema:Schema { description: Some( "This object's GraphQL type. Provided by GraphQL type name introspection.", ), + hack_source: None, }, Field { name: WithLocation { @@ -267,6 +277,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -285,6 +296,7 @@ Text Schema:Schema { description: Some( "Relay's cache key for this object.", ), + hack_source: None, }, Field { name: WithLocation { @@ -299,6 +311,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -329,6 +342,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, ] input_objects: [] @@ -348,6 +362,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -368,6 +383,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -381,6 +397,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -392,6 +409,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -403,6 +421,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -414,6 +433,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -425,6 +445,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [] @@ -459,6 +480,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -487,6 +509,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] enums: [] @@ -506,6 +529,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -522,6 +546,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -538,6 +563,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -554,6 +580,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -570,6 +597,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -586,6 +614,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -602,6 +631,7 @@ fields: [ Object(1), ), description: None, + hack_source: None, }, ] input_objects: [] @@ -626,6 +656,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -641,6 +672,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -654,6 +686,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -665,6 +698,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -676,6 +710,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -687,6 +722,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -698,6 +734,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [] diff --git a/compiler/crates/schema/tests/build_schema/fixtures/interface-implements-interface.expected b/compiler/crates/schema/tests/build_schema/fixtures/interface-implements-interface.expected index 274fda0214714..6df11fd059832 100644 --- a/compiler/crates/schema/tests/build_schema/fixtures/interface-implements-interface.expected +++ b/compiler/crates/schema/tests/build_schema/fixtures/interface-implements-interface.expected @@ -61,6 +61,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -89,6 +90,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] type_map: { @@ -120,6 +122,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -138,6 +141,7 @@ Text Schema:Schema { Interface(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -156,6 +160,7 @@ Text Schema:Schema { Interface(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -174,6 +179,7 @@ Text Schema:Schema { Interface(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -192,6 +198,7 @@ Text Schema:Schema { Interface(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -208,6 +215,7 @@ Text Schema:Schema { Interface(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -226,6 +234,7 @@ Text Schema:Schema { Interface(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -242,6 +251,7 @@ Text Schema:Schema { Interface(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -258,6 +268,7 @@ Text Schema:Schema { Interface(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -276,6 +287,7 @@ Text Schema:Schema { description: Some( "This object's GraphQL type. Provided by GraphQL type name introspection.", ), + hack_source: None, }, Field { name: WithLocation { @@ -292,6 +304,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -310,6 +323,7 @@ Text Schema:Schema { description: Some( "Relay's cache key for this object.", ), + hack_source: None, }, Field { name: WithLocation { @@ -324,6 +338,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -354,6 +369,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, ] input_objects: [] @@ -376,6 +392,7 @@ Text Schema:Schema { directives: [], interfaces: [], description: None, + hack_source: None, }, Interface { name: WithLocation { @@ -398,6 +415,7 @@ Text Schema:Schema { InterfaceID(0), ], description: None, + hack_source: None, }, Interface { name: WithLocation { @@ -421,6 +439,7 @@ Text Schema:Schema { InterfaceID(1), ], description: None, + hack_source: None, }, Interface { name: WithLocation { @@ -443,6 +462,7 @@ Text Schema:Schema { InterfaceID(1), ], description: None, + hack_source: None, }, ] objects: [ @@ -460,6 +480,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -473,6 +494,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -484,6 +506,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -495,6 +518,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -506,6 +530,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -517,6 +542,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [] @@ -551,6 +577,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -579,6 +606,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] enums: [] @@ -600,6 +628,7 @@ fields: [ Interface(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -618,6 +647,7 @@ fields: [ Interface(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -634,6 +664,7 @@ fields: [ Interface(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -650,6 +681,7 @@ fields: [ Interface(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -668,6 +700,7 @@ fields: [ Interface(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -684,6 +717,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -702,6 +736,7 @@ fields: [ Interface(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -720,6 +755,7 @@ fields: [ Interface(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -736,6 +772,7 @@ fields: [ Interface(2), ), description: None, + hack_source: None, }, ] input_objects: [] @@ -758,6 +795,7 @@ interfaces: [ directives: [], interfaces: [], description: None, + hack_source: None, }, Interface { name: WithLocation { @@ -780,6 +818,7 @@ interfaces: [ InterfaceID(1), ], description: None, + hack_source: None, }, Interface { name: WithLocation { @@ -802,6 +841,7 @@ interfaces: [ InterfaceID(0), ], description: None, + hack_source: None, }, Interface { name: WithLocation { @@ -825,6 +865,7 @@ interfaces: [ InterfaceID(1), ], description: None, + hack_source: None, }, ] objects: [ @@ -842,6 +883,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -855,6 +897,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -866,6 +909,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -877,6 +921,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -888,6 +933,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -899,6 +945,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [] diff --git a/compiler/crates/schema/tests/build_schema/fixtures/kitchen-sink.expected b/compiler/crates/schema/tests/build_schema/fixtures/kitchen-sink.expected index ad529c0b9f26e..e49808b257c4d 100644 --- a/compiler/crates/schema/tests/build_schema/fixtures/kitchen-sink.expected +++ b/compiler/crates/schema/tests/build_schema/fixtures/kitchen-sink.expected @@ -92,6 +92,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -120,6 +121,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -164,6 +166,7 @@ Text Schema:Schema { repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] type_map: { @@ -229,6 +232,7 @@ Text Schema:Schema { ], directives: [], description: None, + hack_source: None, }, ] fields: [ @@ -261,6 +265,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -301,6 +306,7 @@ Text Schema:Schema { Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -319,6 +325,7 @@ Text Schema:Schema { Interface(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -337,6 +344,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -353,6 +361,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -369,6 +378,7 @@ Text Schema:Schema { Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -385,6 +395,7 @@ Text Schema:Schema { Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -401,6 +412,7 @@ Text Schema:Schema { Object(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -417,6 +429,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -433,6 +446,7 @@ Text Schema:Schema { Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -451,6 +465,7 @@ Text Schema:Schema { description: Some( "This object's GraphQL type. Provided by GraphQL type name introspection.", ), + hack_source: None, }, Field { name: WithLocation { @@ -467,6 +482,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -485,6 +501,7 @@ Text Schema:Schema { description: Some( "Relay's cache key for this object.", ), + hack_source: None, }, Field { name: WithLocation { @@ -499,6 +516,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, Field { name: WithLocation { @@ -529,6 +547,7 @@ Text Schema:Schema { directives: [], parent_type: None, description: None, + hack_source: None, }, ] input_objects: [ @@ -642,6 +661,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, ] interfaces: [ @@ -663,6 +683,7 @@ Text Schema:Schema { directives: [], interfaces: [], description: None, + hack_source: None, }, ] objects: [ @@ -681,6 +702,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -701,6 +723,7 @@ Text Schema:Schema { ], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -717,6 +740,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -732,6 +756,7 @@ Text Schema:Schema { interfaces: [], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -745,6 +770,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -756,6 +782,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -767,6 +794,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -778,6 +806,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -789,6 +818,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -836,6 +866,7 @@ Text Schema:Schema { }, ], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -847,6 +878,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -858,6 +890,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -869,6 +902,7 @@ Text Schema:Schema { is_extension: false, directives: [], description: None, + hack_source: None, }, ] unions: [ @@ -884,6 +918,7 @@ Text Schema:Schema { ], directives: [], description: None, + hack_source: None, }, ] } @@ -917,6 +952,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -945,6 +981,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, Directive { name: DirectiveName( @@ -989,6 +1026,7 @@ directives: [ repeatable: false, is_extension: false, description: None, + hack_source: None, }, ] enums: [ @@ -1038,6 +1076,7 @@ enums: [ ], directives: [], description: None, + hack_source: None, }, ] fields: [ @@ -1056,6 +1095,7 @@ fields: [ Object(1), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1074,6 +1114,7 @@ fields: [ Interface(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1090,6 +1131,7 @@ fields: [ Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1106,6 +1148,7 @@ fields: [ Object(2), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1136,6 +1179,7 @@ fields: [ Object(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1176,6 +1220,7 @@ fields: [ Object(3), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1194,6 +1239,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1210,6 +1256,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1226,6 +1273,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, Field { name: WithLocation { @@ -1242,6 +1290,7 @@ fields: [ Object(0), ), description: None, + hack_source: None, }, ] input_objects: [ @@ -1355,6 +1404,7 @@ input_objects: [ }, ], description: None, + hack_source: None, }, ] interfaces: [ @@ -1376,6 +1426,7 @@ interfaces: [ directives: [], interfaces: [], description: None, + hack_source: None, }, ] objects: [ @@ -1393,6 +1444,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -1409,6 +1461,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -1425,6 +1478,7 @@ objects: [ interfaces: [], directives: [], description: None, + hack_source: None, }, Object { name: WithLocation { @@ -1445,6 +1499,7 @@ objects: [ ], directives: [], description: None, + hack_source: None, }, ] scalars: [ @@ -1458,6 +1513,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1469,6 +1525,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1480,6 +1537,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1491,6 +1549,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1502,6 +1561,7 @@ scalars: [ is_extension: false, directives: [], description: None, + hack_source: None, }, Scalar { name: WithLocation { @@ -1549,6 +1609,7 @@ scalars: [ }, ], description: None, + hack_source: None, }, ] unions: [ @@ -1564,6 +1625,7 @@ unions: [ ], directives: [], description: None, + hack_source: None, }, ] }