Closed tobias-tengler closed 3 months ago
Ah! I've wanted this for so long but haven't gotten around to it. Let me know when this is ready to review.
It might also be worth checking if we need additional changes in the VSCode extension to get this working end to end. It's possible that we don't hook into .graphql files in the same way we do for js/ts/tsx (I'm really not sure)
Yes, the extension doesn't activate on .graphql files and the internal lsp resources are also not created until you open a document with "JavaScriptFeatures". I've started to address this in https://github.com/facebook/relay/pull/4627 (still early).
Overall, this looks good! That said it's a pretty huge PR. I know GitHub makes this a bit of a pain, but what do you think about splitting this into a few different PRs?
Maybe:
Sounds good. I've created the one for the Spans here: https://github.com/facebook/relay/pull/4633
Spans PR has been merged
This extends the resolution-path module with the capability to resolve paths within a
SchemaDocument
. The following new types have gained path resolution support:SchemaDocument
TypeSystemDefinition
SchemaDefinition
SchemaExtension
OperationTypeDefinition
EnumTypeDefinition
EnumTypeExtension
EnumValueDefinition
InterfaceTypeDefinition
InterfaceTypeExtension
ObjectTypeDefinition
ObjectTypeExtension
UnionTypeDefinition
UnionTypeExtension
InputObjectTypeDefinition
InputObjectTypeExtension
ScalarTypeDefinition
ScalarTypeExtension
DirectiveDefinition
ConstantDirective
FieldDefinition
InputValueDefinition
This is in preparation for better LSP support within schema (extension) documents.