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

reduce gqlgen code #14

Merged
merged 10 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ jobs:
with:
go-version: '^1.16.2'
- name: vet
run: go vet ./...
run: go vet ./...
- name: test
run: go test ./...
46 changes: 45 additions & 1 deletion example/github/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ either curated or that have been selected automatically based on popularity.</p>
</tr>
<tr>
<td><strong>isPrivate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Identifies if the repository is private.</p></td>
<td><p>Identifies if the repository is private or internal.</p></td>
</tr>
<tr>
<td><strong>isTemplate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
Expand Down Expand Up @@ -1993,6 +1993,50 @@ organization or user being viewed owns.</p></p>

---

### RequirableByPullRequest

<p>Represents a type that can be required by a pull request for merging.</p>

#### Implemented by


- [CheckRun](objects.md#checkrun)
- [StatusContext](objects.md#statuscontext)

#### Fields

<table>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><strong>isRequired</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td>
<p><p>Whether this is required to pass before merging for a specific pull request.</p></p>
<table>
<tr>
<th><strong>Arguments</strong></th>
</tr>
<tr>
<td>
<p>pullRequestId (<a href="scalars.md#id">ID</a>)</p>
<p><p>The id of the pull request this is required for</p></p>
</td>
</tr>
<tr>
<td>
<p>pullRequestNumber (<a href="scalars.md#int">Int</a>)</p>
<p><p>The number of the pull request this is required for</p></p>
</td>
</tr>
</table>
</td>
</tr>
</table>

---

### Sponsorable

<p>Entities that can be sponsored through GitHub Sponsors</p>
Expand Down
63 changes: 53 additions & 10 deletions example/github/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,7 @@ range&rsquo;s change.</p></td>


- [Node](interfaces.md#node)
- [RequirableByPullRequest](interfaces.md#requirablebypullrequest)
- [UniformResourceLocatable](interfaces.md#uniformresourcelocatable)

#### Fields
Expand Down Expand Up @@ -1990,15 +1991,21 @@ range&rsquo;s change.</p></td>
<tr>
<td><strong>isRequired</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td>
<p><p>Whether this check run is required to pass before merging.</p></p>
<p><p>Whether this is required to pass before merging for a specific pull request.</p></p>
<table>
<tr>
<th><strong>Arguments</strong></th>
</tr>
<tr>
<td>
<p>pullRequestId (<a href="scalars.md#id">ID!</a>)</p>
<p><p>The pull request this check is required for</p></p>
<p>pullRequestId (<a href="scalars.md#id">ID</a>)</p>
<p><p>The id of the pull request this is required for</p></p>
</td>
</tr>
<tr>
<td>
<p>pullRequestNumber (<a href="scalars.md#int">Int</a>)</p>
<p><p>The number of the pull request this is required for</p></p>
</td>
</tr>
</table>
Expand Down Expand Up @@ -2616,7 +2623,9 @@ range&rsquo;s change.</p></td>
<tr>
<td><strong>associatedPullRequests</strong> (<a href="objects.md#pullrequestconnection">PullRequestConnection</a>)</td>
<td>
<p><p>The pull requests associated with a commit</p></p>
<p><p>The merged Pull Request that introduced the commit to the repository. If the
commit is not present in the default branch, additionally returns open Pull
Requests associated with the commit</p></p>
<table>
<tr>
<th><strong>Arguments</strong></th>
Expand Down Expand Up @@ -8903,7 +8912,7 @@ repository can change repository visibility.</p></td>
</tr>
<tr>
<td><strong>isPrivate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Identifies if the repository is private.</p></td>
<td><p>Identifies if the repository is private or internal.</p></td>
</tr>
<tr>
<td><strong>name</strong> (<a href="scalars.md#string">String!</a>)</td>
Expand Down Expand Up @@ -21169,6 +21178,14 @@ merged, or if the test merge commit is still being generated. See the
<td><strong>viewerDidAuthor</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Did the viewer author this comment.</p></td>
</tr>
<tr>
<td><strong>viewerLatestReview</strong> (<a href="objects.md#pullrequestreview">PullRequestReview</a>)</td>
<td><p>The latest review given from the viewer.</p></td>
</tr>
<tr>
<td><strong>viewerLatestReviewRequest</strong> (<a href="objects.md#reviewrequest">ReviewRequest</a>)</td>
<td><p>The person who has requested the viewer for review on this pull request.</p></td>
</tr>
<tr>
<td><strong>viewerMergeBodyText</strong> (<a href="scalars.md#string">String!</a>)</td>
<td>
Expand Down Expand Up @@ -26767,7 +26784,7 @@ organization or user being viewed owns.</p></p>
</tr>
<tr>
<td><strong>isPrivate</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Identifies if the repository is private.</p></td>
<td><p>Identifies if the repository is private or internal.</p></td>
</tr>
<tr>
<td><strong>isSecurityPolicyEnabled</strong> (<a href="scalars.md#boolean">Boolean</a>)</td>
Expand Down Expand Up @@ -29949,6 +29966,12 @@ amount goals. Represents a count of unique sponsors for total sponsors count goa
<td><strong>adminInfo</strong> (<a href="objects.md#sponsorstieradmininfo">SponsorsTierAdminInfo</a>)</td>
<td><p>SponsorsTier information only visible to users that can administer the associated Sponsors listing.</p></td>
</tr>
<tr>
<td><strong>closestLesserValueTier</strong> (<a href="objects.md#sponsorstier">SponsorsTier</a>)</td>
<td><p>Get a different tier for this tier&rsquo;s maintainer that is at the same frequency
as this tier but with a lesser cost. Returns the published tier with the
monthly price closest to this tier&rsquo;s without going over.</p></td>
</tr>
<tr>
<td><strong>createdAt</strong> (<a href="scalars.md#datetime">DateTime!</a>)</td>
<td><p>Identifies the date and time when the object was created.</p></td>
Expand All @@ -29965,6 +29988,15 @@ amount goals. Represents a count of unique sponsors for total sponsors count goa
<td><strong>id</strong> (<a href="scalars.md#id">ID!</a>)</td>
<td></td>
</tr>
<tr>
<td><strong>isCustomAmount</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Whether this tier was chosen at checkout time by the sponsor rather than
defined ahead of time by the maintainer who manages the Sponsors listing.</p></td>
</tr>
<tr>
<td><strong>isOneTime</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Whether this tier is only for use with one-time sponsorships.</p></td>
</tr>
<tr>
<td><strong>monthlyPriceInCents</strong> (<a href="scalars.md#int">Int!</a>)</td>
<td><p>How much this tier costs per month in cents.</p></td>
Expand Down Expand Up @@ -30130,6 +30162,10 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.</p></p
<td><strong>id</strong> (<a href="scalars.md#id">ID!</a>)</td>
<td></td>
</tr>
<tr>
<td><strong>isOneTimePayment</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td><p>Whether this sponsorship represents a one-time payment versus a recurring sponsorship.</p></td>
</tr>
<tr>
<td><strong>maintainer</strong> (<a href="objects.md#user">User!</a>)</td>
<td><p>The entity that is being sponsored</p></td>
Expand Down Expand Up @@ -30548,7 +30584,8 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.</p></p
#### Implements


- [Node](interfaces.md#node)
- [Node](interfaces.md#node)
- [RequirableByPullRequest](interfaces.md#requirablebypullrequest)

#### Fields

Expand Down Expand Up @@ -30601,15 +30638,21 @@ blank, the sponsorships will be ordered based on relevancy to the viewer.</p></p
<tr>
<td><strong>isRequired</strong> (<a href="scalars.md#boolean">Boolean!</a>)</td>
<td>
<p><p>Whether this status is required to pass before merging.</p></p>
<p><p>Whether this is required to pass before merging for a specific pull request.</p></p>
<table>
<tr>
<th><strong>Arguments</strong></th>
</tr>
<tr>
<td>
<p>pullRequestId (<a href="scalars.md#id">ID!</a>)</p>
<p><p>The pull request this status is required for</p></p>
<p>pullRequestId (<a href="scalars.md#id">ID</a>)</p>
<p><p>The id of the pull request this is required for</p></p>
</td>
</tr>
<tr>
<td>
<p>pullRequestNumber (<a href="scalars.md#int">Int</a>)</p>
<p><p>The number of the pull request this is required for</p></p>
</td>
</tr>
</table>
Expand Down
13 changes: 13 additions & 0 deletions example/shopify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# API Reference

View reference documentation to learn about the data types available in your GraphQL API schema.


- [Query](queries.md)
- [Mutations](mutations.md)
- [Objects](objects.md)
- [Interfaces](interfaces.md)
- [Enums](enums.md)
- [Unions](unions.md)
- [Input objects](input_objects.md)
- [Scalars](scalars.md)
Loading