Like discord presence but for GitHub and with a typo.
Realistically, it shouldn't. This is probably a waste of everyones' time. Whether it is good for humanity that I was not working on something with real-world uses during this time is left as an exercise to the reader.
I saw a GraphQL tutorial while trying to understand some code in the Teams codebase and thought this would be fun, a 20 minute adventure. In and out. You can read the commit history if you want to judge for yourself how well that went.
Option A:
- Add Github PAT with user permissions to environment variable
GITHUB_PAT
. - Add Github username to the environment variable
GITHUB_USERNAME
.
Option B:
- Pass the required Github PAT and username as the
t
andu
arguments respectively. - Start the application. Arguments passed will override env variables.
- (optional) If you're very weird you could run this as a system service I guess. Please let me know if you do, for science.
As a primarily TS developer working in some suboptimal, the Golang debugging experience is really nice. What's not nice is not being able to Google things properly because, well, go <problem>
doesn't always return results for the language. While it's quite easy to replace search strings with golang <problem>
, it breaks my usual pattern of <problem> mdn
and as a Vim User™️ I detest unnecessary keystrokes.
Autogenerated and type-safe gql interfaces are very cool but sometimes lead to issues if you (like me) don't really know what you're doing.
Spot the issue with the request generated by the library vs the one generated by the github api explorer:
{"query":"mutation ($input:ChangeUserStatusInput!){changeUserStatus(input: $input){clientMutationId,status{message}}}","variables":{"input":{"clientMutationId":"ABC","emoji":"","expiresAt":"0001-01-01T00:00:00Z","limitedAvailability":false,"message":"test","organizationId":""}}}
{"query":"mutation ($input: ChangeUserStatusInput!) {\n changeUserStatus(input: $input) {clientMutationId,status {\n message\n }\n }\n}\n","variables":{"input":{"clientMutationId":"69","message":""}}}
The issue is that in the first (lib generated) version, certain fields are populated with empty values. Github's service rejects this because it's looking for an org that doesn't exist. Then you get this lovely response from the server: "message": "Could not resolve to a node with the global id of ''"
. Really helpful.
https://github.com/Khan/genqlient/ is quite cool but stole many hours of my life.