Skip to content

Commit

Permalink
Updated DEV-README
Browse files Browse the repository at this point in the history
  • Loading branch information
nqnguyen1 committed Jul 6, 2023
1 parent d689a02 commit b9bbbbc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,22 @@ Swell is a one-stop shop for sending and monitoring your API requests:
<!-- -TODO --- This needs to be updated -->
<img src="./ReadMeGifs/Gifs/gRPC.gif" style="display: block; margin: 10px auto 30px;" />

- _tRPC_: Swell includes full support for all methods of TypeScript Remote Procedure Calls including batch call support for queries and mutations.
- _tRPC_: Swell includes full support for all methods of TypeScript Remote Procedure Calls including batch call support for queries and mutations as well as subscription
<img src="./ReadMeGifs/Gifs/trpc.gif" style="display: block; margin: 10px auto 30px;" />
<!-- <img src="./ReadMeGifs/Gifs/tRPC-subscription.gif" style="display: block; margin: 10px auto 30px;" /> -->

Calls are currently being made using Swell's own TRPCProxyClient generated from the URL provided by the user.
Batch requests must be entered one request per line. Swell will treat each line of code entered into the editor as a separate request before batching and returning responses.
Each request must follow the general format client.procedure.querytype(). For example:
Calls are currently being made using by using http get and post request using TRPC's http RPC specification (See [RPC docs](https://trpc.io/docs/rpc)). TLDR- inputs for query procedures will be turn into uri-encoded json string and send as query param while inputs for mutate procedures will be store inside of the body.

Batch requests can be made by adding multiple procedures before sending out the request, all query procedures will get batch together into one singular get request and all mutate procedures will get batch together into one singular put request, if there are mixture of query and mutate procedures call in one request, the app will send out both a post and get request concurrently and combine the response into one response.

Nested endpoint must follow the general format parentEndpoint.childEndpoint.grandchildEndpoint. For example:

```js
client.getUser.query({ name: 'Luke Skywalker' });
client.user.update.mutate({ userId: '1', name: 'Luke' });
```

A request to the above endpoint must have the mutate option selected from the drop down menu, must have an endpoint of .user.update and a input body of {"userId": "1","name": "Luke"}

See [tRPC docs](https://trpc.io/docs/) for more information on sending tRPC requests or setting up a tRPC server.

## Additional features
Expand Down
Binary file modified ReadMeGifs/Gifs/trpc.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs/DEV-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ From a functionality standpoint:
- Consistent UI/UX styling and color palette
- Make requests via HTTP/2
- Query, Mutation, Subscribe/unsubscribe to GraphQL endpoints
- Query, Mutation, Subscribe/unsubscribe to tRPC endpoints
- HTTP/2 stress testing with `GET` requests
- GraphQL stress testing with `Query`
- Mock server for HTTP/2 (`Express`)
Expand Down Expand Up @@ -110,7 +111,8 @@ For the following technologies - if you reference the gifs in `readme` and try t

<!-- - gRPC -->

- tRPC
<!-- - tRPC -->

- OpenAPI

If future groups have a desire to iteration on the above features, please ensure the basic functionality works as expected, update E2E testing in `./test/testSuite.js` before adding new features.
Expand Down Expand Up @@ -161,7 +163,7 @@ Continuous Integration has been implemented using GitHub Actions. If you would l
- Make any necessary adjustments to the workflow and continue testing it on ci-draft and ci-main until the workflow is functioning as intended
- Finally, open a pull request to merge the new workflow into the dev and/or main branches

The idea is to troubleshoot new workflows before applying them to the dev or main branches.
The idea is to troubleshoot new workflows before applying them to the dev or main branches.

A Continuous Deployment pipeline would be an advantageous addition, as its absence blocks the ability to automatically package and release new iterations of the application. The groundwork for it is there (see the “scripts” and “build” properties in package.json) but packaging for Linux will need some attention, as outlined in the next section.

Expand Down

0 comments on commit b9bbbbc

Please sign in to comment.