Skip to content

Commit 39bcc52

Browse files
committed
Fix mismatches between docs on json and graphql GitHub schemas
1 parent 1e90949 commit 39bcc52

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

examples/github/src/schema.graphql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,7 @@ type Blame {
319319
"Represents a range of information from a Git blame."
320320
type BlameRange {
321321
"""
322-
Identifies the recency of the change, from 1 (new) to 10 (old). This is
323-
calculated as a 2-quantile and determines the length of distance between the
324-
median age of all the changes in the file and the recency of the current
322+
Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current
325323
range's change.
326324
"""
327325
age: Int!
@@ -1895,7 +1893,9 @@ type GpgSignature implements GitSignature {
18951893
"GitHub user corresponding to the email signing this commit."
18961894
signer: User
18971895

1898-
"""The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid."""
1896+
"""
1897+
The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.
1898+
"""
18991899
state: GitSignatureState!
19001900

19011901
"True if the signature was made with GitHub's signing key."

graphql_query_derive/src/tests/github.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ fn ast_from_graphql_and_json_produce_the_same_schema() {
1717

1818
assert_eq!(json.scalars, gql.scalars);
1919
for (json, gql) in json.objects.iter().zip(gql.objects.iter()) {
20+
for (j, g) in json.1.fields.iter().zip(gql.1.fields.iter()) {
21+
assert_eq!(j, g);
22+
}
2023
assert_eq!(json, gql)
2124
}
2225
for (json, gql) in json.unions.iter().zip(gql.unions.iter()) {

graphql_query_derive/src/tests/github_schema.graphql

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,7 @@ type Blame {
319319
"Represents a range of information from a Git blame."
320320
type BlameRange {
321321
"""
322-
Identifies the recency of the change, from 1 (new) to 10 (old). This is
323-
calculated as a 2-quantile and determines the length of distance between the
324-
median age of all the changes in the file and the recency of the current
325-
range's change.
322+
Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current range's change.
326323
"""
327324
age: Int!
328325

@@ -1895,7 +1892,9 @@ type GpgSignature implements GitSignature {
18951892
"GitHub user corresponding to the email signing this commit."
18961893
signer: User
18971894

1898-
"""The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid."""
1895+
"""
1896+
The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.
1897+
"""
18991898
state: GitSignatureState!
19001899

19011900
"True if the signature was made with GitHub's signing key."

graphql_query_derive/src/tests/github_schema.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10768,7 +10768,7 @@
1076810768
},
1076910769
{
1077010770
"name": "potentialMergeCommit",
10771-
"description": "The commit that GitHub automatically generated to test if this pull request could be merged. This field will not return a value if the pull request is merged, or if the test merge commit is still being generated. See the `mergeable` field for more details on the mergeability of the pull request.",
10771+
"description": "The commit that GitHub automatically generated to test if this pull request\ncould be merged. This field will not return a value if the pull request is\nmerged, or if the test merge commit is still being generated. See the\n`mergeable` field for more details on the mergeability of the pull request.\n",
1077210772
"args": [],
1077310773
"type": {
1077410774
"kind": "OBJECT",
@@ -13698,7 +13698,7 @@
1369813698
},
1369913699
{
1370013700
"name": "tarballUrl",
13701-
"description": "Returns a URL to download a tarball archive for a repository.\nNote: For private repositories, these links are temporary and expire after five minutes.",
13701+
"description": "Returns a URL to download a tarball archive for a repository.\nNote: For private repositories, these links are temporary and expire after five minutes.\n",
1370213702
"args": [],
1370313703
"type": {
1370413704
"kind": "NON_NULL",
@@ -13806,7 +13806,7 @@
1380613806
},
1380713807
{
1380813808
"name": "zipballUrl",
13809-
"description": "Returns a URL to download a zipball archive for a repository.\nNote: For private repositories, these links are temporary and expire after five minutes.",
13809+
"description": "Returns a URL to download a zipball archive for a repository.\nNote: For private repositories, these links are temporary and expire after five minutes.\n",
1381013810
"args": [],
1381113811
"type": {
1381213812
"kind": "NON_NULL",
@@ -17702,7 +17702,7 @@
1770217702
},
1770317703
{
1770417704
"name": "isDraft",
17705-
"description": "Whether this listing is still an editable draft that has not been submitted for review and is not publicly visible in the Marketplace.",
17705+
"description": "Whether this listing is still an editable draft that has not been submitted\nfor review and is not publicly visible in the Marketplace.\n",
1770617706
"args": [],
1770717707
"type": {
1770817708
"kind": "NON_NULL",
@@ -18157,7 +18157,7 @@
1815718157
},
1815818158
{
1815918159
"name": "viewerHasPurchased",
18160-
"description": "Indicates whether the current user has an active subscription to this Marketplace listing.\n",
18160+
"description": "Indicates whether the current user has an active subscription to this Marketplace listing.",
1816118161
"args": [],
1816218162
"type": {
1816318163
"kind": "NON_NULL",
@@ -18189,7 +18189,7 @@
1818918189
},
1819018190
{
1819118191
"name": "viewerIsListingAdmin",
18192-
"description": "Does the current viewer role allow them to administer this Marketplace listing.\n",
18192+
"description": "Does the current viewer role allow them to administer this Marketplace listing.",
1819318193
"args": [],
1819418194
"type": {
1819518195
"kind": "NON_NULL",
@@ -23422,7 +23422,7 @@
2342223422
"fields": [
2342323423
{
2342423424
"name": "age",
23425-
"description": "Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current range's change.",
23425+
"description": "Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current range's change.\n",
2342623426
"args": [],
2342723427
"type": {
2342823428
"kind": "NON_NULL",
@@ -40393,7 +40393,7 @@
4039340393
},
4039440394
{
4039540395
"name": "state",
40396-
"description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.",
40396+
"description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.\n",
4039740397
"args": [],
4039840398
"type": {
4039940399
"kind": "NON_NULL",
@@ -40518,7 +40518,7 @@
4051840518
},
4051940519
{
4052040520
"name": "state",
40521-
"description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.",
40521+
"description": "The state of this signature. `VALID` if signature is valid and verified by\nGitHub, otherwise represents reason why signature is considered invalid.\n",
4052240522
"args": [],
4052340523
"type": {
4052440524
"kind": "NON_NULL",
@@ -40817,7 +40817,7 @@
4081740817
},
4081840818
{
4081940819
"name": "state",
40820-
"description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.",
40820+
"description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.\n",
4082140821
"args": [],
4082240822
"type": {
4082340823
"kind": "NON_NULL",

0 commit comments

Comments
 (0)