Skip to content

Commit b9bbbbc

Browse files
committed
Updated DEV-README
1 parent d689a02 commit b9bbbbc

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,22 @@ Swell is a one-stop shop for sending and monitoring your API requests:
4545
<!-- -TODO --- This needs to be updated -->
4646
<img src="./ReadMeGifs/Gifs/gRPC.gif" style="display: block; margin: 10px auto 30px;" />
4747

48-
- _tRPC_: Swell includes full support for all methods of TypeScript Remote Procedure Calls including batch call support for queries and mutations.
48+
- _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
4949
<img src="./ReadMeGifs/Gifs/trpc.gif" style="display: block; margin: 10px auto 30px;" />
5050
<!-- <img src="./ReadMeGifs/Gifs/tRPC-subscription.gif" style="display: block; margin: 10px auto 30px;" /> -->
5151

52-
Calls are currently being made using Swell's own TRPCProxyClient generated from the URL provided by the user.
53-
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.
54-
Each request must follow the general format client.procedure.querytype(). For example:
52+
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.
53+
54+
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.
55+
56+
Nested endpoint must follow the general format parentEndpoint.childEndpoint.grandchildEndpoint. For example:
5557

5658
```js
57-
client.getUser.query({ name: 'Luke Skywalker' });
59+
client.user.update.mutate({ userId: '1', name: 'Luke' });
5860
```
5961

62+
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"}
63+
6064
See [tRPC docs](https://trpc.io/docs/) for more information on sending tRPC requests or setting up a tRPC server.
6165

6266
## Additional features

ReadMeGifs/Gifs/trpc.gif

3.1 MB
Loading

docs/DEV-README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ From a functionality standpoint:
6666
- Consistent UI/UX styling and color palette
6767
- Make requests via HTTP/2
6868
- Query, Mutation, Subscribe/unsubscribe to GraphQL endpoints
69+
- Query, Mutation, Subscribe/unsubscribe to tRPC endpoints
6970
- HTTP/2 stress testing with `GET` requests
7071
- GraphQL stress testing with `Query`
7172
- Mock server for HTTP/2 (`Express`)
@@ -110,7 +111,8 @@ For the following technologies - if you reference the gifs in `readme` and try t
110111

111112
<!-- - gRPC -->
112113

113-
- tRPC
114+
<!-- - tRPC -->
115+
114116
- OpenAPI
115117

116118
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.
@@ -161,7 +163,7 @@ Continuous Integration has been implemented using GitHub Actions. If you would l
161163
- Make any necessary adjustments to the workflow and continue testing it on ci-draft and ci-main until the workflow is functioning as intended
162164
- Finally, open a pull request to merge the new workflow into the dev and/or main branches
163165

164-
The idea is to troubleshoot new workflows before applying them to the dev or main branches.
166+
The idea is to troubleshoot new workflows before applying them to the dev or main branches.
165167

166168
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.
167169

0 commit comments

Comments
 (0)