Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

Commit c65df78

Browse files
authored
Merge pull request #14 from Code-Hex/fix/reduce-gqlgen-code
reduce gqlgen code
2 parents d6eb388 + fe9bfe3 commit c65df78

File tree

19 files changed

+20834
-1569
lines changed

19 files changed

+20834
-1569
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ jobs:
2222
with:
2323
go-version: '^1.16.2'
2424
- name: vet
25-
run: go vet ./...
25+
run: go vet ./...
26+
- name: test
27+
run: go test ./...

example/github/interfaces.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ either curated or that have been selected automatically based on popularity.</p>
17401740
</tr>
17411741
<tr>
17421742
<td><strong>isPrivate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
1743-
<td><p>Identifies if the repository is private.</p></td>
1743+
<td><p>Identifies if the repository is private or internal.</p></td>
17441744
</tr>
17451745
<tr>
17461746
<td><strong>isTemplate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
@@ -1993,6 +1993,50 @@ organization or user being viewed owns.</p></p>
19931993

19941994
---
19951995

1996+
### RequirableByPullRequest
1997+
1998+
<p>Represents a type that can be required by a pull request for merging.</p>
1999+
2000+
#### Implemented by
2001+
2002+
2003+
- [CheckRun](objects.md#checkrun)
2004+
- [StatusContext](objects.md#statuscontext)
2005+
2006+
#### Fields
2007+
2008+
<table>
2009+
<tr>
2010+
<th>Name</th>
2011+
<th>Description</th>
2012+
</tr>
2013+
<tr>
2014+
<td><strong>isRequired</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
2015+
<td>
2016+
<p><p>Whether this is required to pass before merging for a specific pull request.</p></p>
2017+
<table>
2018+
<tr>
2019+
<th><strong>Arguments</strong></th>
2020+
</tr>
2021+
<tr>
2022+
<td>
2023+
<p>pullRequestId (<a href="scalars.md#id">ID</a>)</p>
2024+
<p><p>The id of the pull request this is required for</p></p>
2025+
</td>
2026+
</tr>
2027+
<tr>
2028+
<td>
2029+
<p>pullRequestNumber (<a href="scalars.md#int">Int</a>)</p>
2030+
<p><p>The number of the pull request this is required for</p></p>
2031+
</td>
2032+
</tr>
2033+
</table>
2034+
</td>
2035+
</tr>
2036+
</table>
2037+
2038+
---
2039+
19962040
### Sponsorable
19972041

19982042
<p>Entities that can be sponsored through GitHub Sponsors</p>

example/github/objects.md

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ range&rsquo;s change.</p></td>
19151915

19161916

19171917
- [Node](interfaces.md#node)
1918+
- [RequirableByPullRequest](interfaces.md#requirablebypullrequest)
19181919
- [UniformResourceLocatable](interfaces.md#uniformresourcelocatable)
19191920

19201921
#### Fields
@@ -1990,15 +1991,21 @@ range&rsquo;s change.</p></td>
19901991
<tr>
19911992
<td><strong>isRequired</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
19921993
<td>
1993-
<p><p>Whether this check run is required to pass before merging.</p></p>
1994+
<p><p>Whether this is required to pass before merging for a specific pull request.</p></p>
19941995
<table>
19951996
<tr>
19961997
<th><strong>Arguments</strong></th>
19971998
</tr>
19981999
<tr>
19992000
<td>
2000-
<p>pullRequestId (<a href="scalars.md#id">ID!</a>)</p>
2001-
<p><p>The pull request this check is required for</p></p>
2001+
<p>pullRequestId (<a href="scalars.md#id">ID</a>)</p>
2002+
<p><p>The id of the pull request this is required for</p></p>
2003+
</td>
2004+
</tr>
2005+
<tr>
2006+
<td>
2007+
<p>pullRequestNumber (<a href="scalars.md#int">Int</a>)</p>
2008+
<p><p>The number of the pull request this is required for</p></p>
20022009
</td>
20032010
</tr>
20042011
</table>
@@ -2616,7 +2623,9 @@ range&rsquo;s change.</p></td>
26162623
<tr>
26172624
<td><strong>associatedPullRequests</strong> (<a href="objects.md#pullrequestconnection">PullRequestConnection</a>)</td>
26182625
<td>
2619-
<p><p>The pull requests associated with a commit</p></p>
2626+
<p><p>The merged Pull Request that introduced the commit to the repository. If the
2627+
commit is not present in the default branch, additionally returns open Pull
2628+
Requests associated with the commit</p></p>
26202629
<table>
26212630
<tr>
26222631
<th><strong>Arguments</strong></th>
@@ -8903,7 +8912,7 @@ repository can change repository visibility.</p></td>
89038912
</tr>
89048913
<tr>
89058914
<td><strong>isPrivate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
8906-
<td><p>Identifies if the repository is private.</p></td>
8915+
<td><p>Identifies if the repository is private or internal.</p></td>
89078916
</tr>
89088917
<tr>
89098918
<td><strong>name</strong> (<a href="scalars.md#string">String!</a>)</td>
@@ -21169,6 +21178,14 @@ merged, or if the test merge commit is still being generated. See the
2116921178
<td><strong>viewerDidAuthor</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
2117021179
<td><p>Did the viewer author this comment.</p></td>
2117121180
</tr>
21181+
<tr>
21182+
<td><strong>viewerLatestReview</strong> (<a href="objects.md#pullrequestreview">PullRequestReview</a>)</td>
21183+
<td><p>The latest review given from the viewer.</p></td>
21184+
</tr>
21185+
<tr>
21186+
<td><strong>viewerLatestReviewRequest</strong> (<a href="objects.md#reviewrequest">ReviewRequest</a>)</td>
21187+
<td><p>The person who has requested the viewer for review on this pull request.</p></td>
21188+
</tr>
2117221189
<tr>
2117321190
<td><strong>viewerMergeBodyText</strong> (<a href="scalars.md#string">String!</a>)</td>
2117421191
<td>
@@ -26767,7 +26784,7 @@ organization or user being viewed owns.</p></p>
2676726784
</tr>
2676826785
<tr>
2676926786
<td><strong>isPrivate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
26770-
<td><p>Identifies if the repository is private.</p></td>
26787+
<td><p>Identifies if the repository is private or internal.</p></td>
2677126788
</tr>
2677226789
<tr>
2677326790
<td><strong>isSecurityPolicyEnabled</strong> (<a href="scalars.md#boolean">Boolean</a>)</td>
@@ -29949,6 +29966,12 @@ amount goals. Represents a count of unique sponsors for total sponsors count goa
2994929966
<td><strong>adminInfo</strong> (<a href="objects.md#sponsorstieradmininfo">SponsorsTierAdminInfo</a>)</td>
2995029967
<td><p>SponsorsTier information only visible to users that can administer the associated Sponsors listing.</p></td>
2995129968
</tr>
29969+
<tr>
29970+
<td><strong>closestLesserValueTier</strong> (<a href="objects.md#sponsorstier">SponsorsTier</a>)</td>
29971+
<td><p>Get a different tier for this tier&rsquo;s maintainer that is at the same frequency
29972+
as this tier but with a lesser cost. Returns the published tier with the
29973+
monthly price closest to this tier&rsquo;s without going over.</p></td>
29974+
</tr>
2995229975
<tr>
2995329976
<td><strong>createdAt</strong> (<a href="scalars.md#datetime">DateTime!</a>)</td>
2995429977
<td><p>Identifies the date and time when the object was created.</p></td>
@@ -29965,6 +29988,15 @@ amount goals. Represents a count of unique sponsors for total sponsors count goa
2996529988
<td><strong>id</strong> (<a href="scalars.md#id">ID!</a>)</td>
2996629989
<td></td>
2996729990
</tr>
29991+
<tr>
29992+
<td><strong>isCustomAmount</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
29993+
<td><p>Whether this tier was chosen at checkout time by the sponsor rather than
29994+
defined ahead of time by the maintainer who manages the Sponsors listing.</p></td>
29995+
</tr>
29996+
<tr>
29997+
<td><strong>isOneTime</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
29998+
<td><p>Whether this tier is only for use with one-time sponsorships.</p></td>
29999+
</tr>
2996830000
<tr>
2996930001
<td><strong>monthlyPriceInCents</strong> (<a href="scalars.md#int">Int!</a>)</td>
2997030002
<td><p>How much this tier costs per month in cents.</p></td>
@@ -30130,6 +30162,10 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.</p></p
3013030162
<td><strong>id</strong> (<a href="scalars.md#id">ID!</a>)</td>
3013130163
<td></td>
3013230164
</tr>
30165+
<tr>
30166+
<td><strong>isOneTimePayment</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
30167+
<td><p>Whether this sponsorship represents a one-time payment versus a recurring sponsorship.</p></td>
30168+
</tr>
3013330169
<tr>
3013430170
<td><strong>maintainer</strong> (<a href="objects.md#user">User!</a>)</td>
3013530171
<td><p>The entity that is being sponsored</p></td>
@@ -30548,7 +30584,8 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.</p></p
3054830584
#### Implements
3054930585

3055030586

30551-
- [Node](interfaces.md#node)
30587+
- [Node](interfaces.md#node)
30588+
- [RequirableByPullRequest](interfaces.md#requirablebypullrequest)
3055230589

3055330590
#### Fields
3055430591

@@ -30601,15 +30638,21 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.</p></p
3060130638
<tr>
3060230639
<td><strong>isRequired</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
3060330640
<td>
30604-
<p><p>Whether this status is required to pass before merging.</p></p>
30641+
<p><p>Whether this is required to pass before merging for a specific pull request.</p></p>
3060530642
<table>
3060630643
<tr>
3060730644
<th><strong>Arguments</strong></th>
3060830645
</tr>
3060930646
<tr>
3061030647
<td>
30611-
<p>pullRequestId (<a href="scalars.md#id">ID!</a>)</p>
30612-
<p><p>The pull request this status is required for</p></p>
30648+
<p>pullRequestId (<a href="scalars.md#id">ID</a>)</p>
30649+
<p><p>The id of the pull request this is required for</p></p>
30650+
</td>
30651+
</tr>
30652+
<tr>
30653+
<td>
30654+
<p>pullRequestNumber (<a href="scalars.md#int">Int</a>)</p>
30655+
<p><p>The number of the pull request this is required for</p></p>
3061330656
</td>
3061430657
</tr>
3061530658
</table>

example/shopify/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# API Reference
2+
3+
View reference documentation to learn about the data types available in your GraphQL API schema.
4+
5+
6+
- [Query](queries.md)
7+
- [Mutations](mutations.md)
8+
- [Objects](objects.md)
9+
- [Interfaces](interfaces.md)
10+
- [Enums](enums.md)
11+
- [Unions](unions.md)
12+
- [Input objects](input_objects.md)
13+
- [Scalars](scalars.md)

0 commit comments

Comments
 (0)