https://github.com/remind101/negapollo-ts-bug-squash
https://github.com/remind101/negapollo-ts-bug-squash
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/remind101/negapollo-ts-bug-squash
- Owner: remind101
- Created: 2020-11-17T16:22:24.000Z (over 5 years ago)
- Default Branch: fe-bug-squash
- Last Pushed: 2020-11-18T00:37:31.000Z (over 5 years ago)
- Last Synced: 2025-02-28T00:55:30.326Z (over 1 year ago)
- Language: TypeScript
- Size: 184 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# r101-negapollo: TypeScript Bug Squash

`r101-negapollo` is a proxy that routes all queries to `r101-apollo`, our GraphQL service, and makes a second request to a dark-launched query when needed. In this specific case, the dark launch query is made when the query string matches `nonV2ClassById`. `r101-negapollo` also has diffing logic to log if the responses of the current query and the dark-launched query were a match or a mismatch.
### Example Use Case
If we wanted to make a change to make a query more performant, we could use `r101-negapollo` and its diffing functionality to ensure that our new query worked as expected and returned the exact same data as our old query - without actually rolling it out and running the risk of returning bad data to our users.
# Your Goal: Squash The Bug!
< TBD - More details about the bug go here >
### Getting Started
1. Install the dependencies and run the dev server.
```
yarn install && yarn dev
```
2. Install [httpie](https://httpie.io/docs#installation). If you have `homebrew`, you can run the following:
```
brew install httpie
````
3. Go to https://www.classchirp.com and log in with the credentials provided by your interviewer. Make note of your auth token and CSRF token. :sparkles:
4. Make your first request!
```
# The class ID in this request is correct for the account we've set up!
http -v POST http://localhost:8081/graphql 'Cookie:auth_token=;csrf_token=;
client_uuid=8b3eab46-deba-4f11-aa3f-9f7f78f8398c' Accept-Encoding:text x-csrf-token:
query="query="{ nonV2ClassById(id: 242461) { className, classCode, joinUrl } }""
```
5. Check the server logs. As long as you see < TBD - desired log line >, you're good to go - happy bug squashing! :bug: :beetle: