Files
genqlient/example/README.md
T
Ben KraftandGitHub ce079a7e16 Clean up example a little (#89)
## Summary:
I realized:
- it's simpler to avoid the usual `cmd` and just put it all in the same
  directory
- we don't need schema.json since GitHub now posts a schema in SDL
  format

## Test plan:
make lint example


Author: benjaminjkraft

Reviewers: dnerdy, StevenACoffman, aberkan, jvoll, mahtabsabet, MiguelCastillo

Required Reviewers: 

Approved By: dnerdy, StevenACoffman

Checks:  Test (1.17),  Test (1.16),  Test (1.15),  Test (1.14),  Lint,  Test (1.17),  Test (1.16),  Test (1.15),  Test (1.14),  Lint

Pull Request URL: https://github.com/Khan/genqlient/pull/89
2021-09-15 10:48:50 -07:00

24 lines
630 B
Markdown

# example of genqlient
## Invoking the example
Create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with no scopes.
To run the example:
```sh
$ GITHUB_TOKEN=<your token> go run . <username>
you are Ben Kraft
csilvers is Craig Silverstein
```
## Running genqlient
It's already checked in to GitHub, but to regenerate `generated.go`:
```sh
go generate ./...
```
## Generating the schema file
The schema file is also checked in, but to update it, download from the [GitHub API documentation](https://docs.github.com/en/graphql/overview/public-schema).