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 13, 2024
1 parent 0107525 commit 107ae60
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ type InputVariables = Variables<IssuesQuery>
## FAQ
### Why query string is copied to TypeScript file as well?
<details>
<summary><strong>Why query string is copied to TypeScript file as well?</strong></summary>
To make it easier to import queries in TypeScript projects. As well to connect
generated output types with query source code.
Expand All @@ -173,7 +174,10 @@ function query<T extends Query>(query: T, variables?: Variables<T>) {
const { issues } = await query(IssuesQuery, { login: 'webpod' })
```

### Does Megaera support fragments?
</details>

<details>
<summary><strong>Does Megaera support fragments?</strong></summary>

Yes, Megaera fully supports fragments. Fragments are generated as separate types,
and can be used independently.
Expand Down Expand Up @@ -206,6 +210,9 @@ import { Issue, IssuesQuery } from './query.graphql.js'
const firstIssue: Issue = query(IssuesQuery).issues.nodes[0]
```

</details>


## License

[MIT](LICENSE)

0 comments on commit 107ae60

Please sign in to comment.