Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmedv committed Jul 10, 2024
1 parent 4ee6102 commit 7e15f17
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 74 deletions.
1 change: 1 addition & 0 deletions .github/graphql-megaera.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
142 changes: 68 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# GraphQL Megaera
# GraphQL Megaera – GraphQL to TypeScript generator

<p align="center">
<strong>GraphQL TypeScript Generator</strong>
</p>
<p align="center"><img src=".github/graphql-megaera.svg" width="220" alt="GraphQL Megaera"></p>

<table>
<tr>
Expand All @@ -13,43 +11,41 @@
<td>

```graphql
query IssuesQuery($username: String!) {
repository(owner: "webpod", name: "graphql-megaera") {
issues(first: 100, filterBy: { createdBy: $username }) {
totalCount
nodes {
createdAt
closedAt
closed
author {
login
}
number
title
labels(first: 10) {
totalCount
nodes {
name
}
}
body
comments(first: 10) {
totalCount
nodes {
body
}
}
repository {
owner {
login
}
query IssuesQuery {
issues(first: 100) {
totalCount
nodes {
createdAt
closedAt
closed
author {
login
}
number
title
labels(first: 10) {
totalCount
nodes {
name
}
}
pageInfo {
hasNextPage
endCursor
body
comments(first: 10) {
totalCount
nodes {
body
}
}
repository {
owner {
login
}
name
}
}
pageInfo {
hasNextPage
endCursor
}
}
rateLimit {
Expand All @@ -65,52 +61,50 @@ query IssuesQuery($username: String!) {
<td>

```ts
type IssuesQuery = (vars: { username: string }) => {
repository: {
issues: {
totalCount: number
nodes: Array<{
createdAt: string
closedAt: string | null
closed: boolean
author: {
login: string
} | null
number: number
title: string
labels: {
totalCount: number
nodes: Array<{
name: string
}> | null
} | null
body: string
comments: {
totalCount: number
nodes: Array<{
body: string
}> | null
}
repository: {
owner: {
login: string
}
type IssuesQuery = () => {
issues: {
totalCount: number
nodes: Array<{
createdAt: string
closedAt: string | null
closed: boolean
author: {
login: string
}
number: number
title: string
labels: {
totalCount: number
nodes: Array<{
name: string
}>
}
body: string
comments: {
totalCount: number
nodes: Array<{
body: string
}>
}
repository: {
owner: {
login: string
}
}> | null
pageInfo: {
hasNextPage: boolean
endCursor: string | null
name: string
}
}>
pageInfo: {
hasNextPage: boolean
endCursor: string | null
}
} | null
}
rateLimit: {
limit: number
cost: number
remaining: number
resetAt: string
} | null
} | null
}
}
```
</td>
Expand Down

0 comments on commit 7e15f17

Please sign in to comment.