-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document __typename and __id in LSP hover
Reviewed By: alunyov Differential Revision: D39375625 fbshipit-source-id: e6266ac1b0305eae885ac488bd452e135f82a800
- Loading branch information
1 parent
d24c295
commit 298af34
Showing
14 changed files
with
117 additions
and
24 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
compiler/crates/relay-lsp/tests/hover/fixtures/double_underscore_id_field.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
==================================== INPUT ==================================== | ||
query MyQuery { | ||
me { | ||
_|_id | ||
} | ||
} | ||
==================================== OUTPUT =================================== | ||
Field: **__id** | ||
-- | ||
Relay's cache key for this object. | ||
-- | ||
Type: **[ID!](command:nuclide.relay-lsp.openSchemaExplorer?{%22path%22:[%22Query%22,%22User%22,%22ID%22],%22schemaName%22:%22Some%20Schema%20Name%22})** | ||
-- | ||
**Client Schema Extension**: This field was declared as a Relay Client Schema Extension, and is therefore only avalaible in Relay code. [Learn More](https://relay.dev/docs/guided-tour/updating-data/client-only-data/#client-only-data-client-schema-extensions). |
5 changes: 5 additions & 0 deletions
5
compiler/crates/relay-lsp/tests/hover/fixtures/double_underscore_id_field.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
query MyQuery { | ||
me { | ||
_|_id | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
compiler/crates/relay-lsp/tests/hover/fixtures/double_underscore_typename_field.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
==================================== INPUT ==================================== | ||
query MyQuery { | ||
me { | ||
_|_typename | ||
} | ||
} | ||
==================================== OUTPUT =================================== | ||
Field: **__typename** | ||
-- | ||
This object's GraphQL type. Provided by GraphQL type name introspection. | ||
-- | ||
Type: **[String!](command:nuclide.relay-lsp.openSchemaExplorer?{%22path%22:[%22Query%22,%22User%22,%22String%22],%22schemaName%22:%22Some%20Schema%20Name%22})** |
5 changes: 5 additions & 0 deletions
5
compiler/crates/relay-lsp/tests/hover/fixtures/double_underscore_typename_field.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
query MyQuery { | ||
me { | ||
_|_typename | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
use intern::string_key::Intern; | ||
use intern::string_key::StringKey; | ||
use lazy_static::lazy_static; | ||
|
||
lazy_static! { | ||
pub static ref CLIENT_ID_DESCRIPTION: StringKey = "Relay's cache key for this object.".intern(); | ||
pub static ref TYPENAME_DESCRIPTION: StringKey = | ||
"This object's GraphQL type. Provided by GraphQL type name introspection.".intern(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters