Skip to content

Commit

Permalink
Add clarifications to gRPC reflection docs (#154)
Browse files Browse the repository at this point in the history
This makes the gRPC reflection docs a bit clearer.
  • Loading branch information
rebello95 authored Aug 18, 2023
1 parent 948d0fc commit d7e362d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions docs/insomnia/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,35 @@ In the current iteration, Insomnia allows you to upload your proto file or colle

As such, a proto file also cannot import a different proto file from your file system, because the relative path link will be lost. You can upload a directory which contains multiple proto files, and they can import other proto files within that directory structure (see below). In future iterations we intend to extend the ways in which you can input a proto file, including keeping in sync with the file system, loading from a network location.

### Add Proto File
### Add a Local Proto File

We added a proto file when creating a request above. Whenever you need to select a proto file, you will be given the option to add a new one. In the example above, we added a proto file when creating a new request, but lets say we now want to change the proto file linked to the current request by adding a new one. Navigate to the request, and select **click to change proto file**.

This will open the proto files modal again, and list the one we added earlier. Click **Add Proto File**, and add a new one. We now see two proto files added to the workspace.

### Add Directory
### Add a Local Directory

Click **Add Directory** to add multiple at once.

"root.proto" imports all other proto files listed in the **Library** directory.

### gRPC Server Reflection
**Available in Insomnia version 2022.7.0**
Insomnia Supports gRPC Server Reflection as of version 2022.7.0. For more documentation on what gRPC Server Reflection is, please look at [this documentation](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md)
### Use gRPC Server Reflection

**Available in Insomnia version 2022.7.0 and later.**

### Rename Proto File
Insomnia supports [gRPC Server Reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md) as of version 2022.7.0.

If the server you are sending requests to supports gRPC Server Reflection, you can use this as an alternative to adding local Protobuf files to Insomnia. To use reflection, create a new gRPC request and enter the [service host](#tlsssl) (e.g., `grpcs://grpcb.in:9001`). Next, click on the button to the right with a sync icon (it shows "Click to use server reflection" on hover). If reflection is working properly, you should be able to click "Select Method" and choose an RPC from the dropdown which is populated with a list of RPCs from the reflection server. Finally, add a request body and click "Send".

### Rename a Local Proto File

Double click on a proto file name in order to edit it. Files inside a directory cannot be renamed.

### Re-upload
### Re-upload a Local Proto File

Click on the upload button and select a proto file from your file system. This can be any file, it does not have to be the exact same file. Just remember, when you re-upload a proto file, all requests that link to the file you have changed, will also update. Ideally you will only re-upload the same proto file, when the service definition has changed, rather than a new file altogether.

### Delete
### Delete a Local Proto File

Click on the delete button. You will be prompted with a confirmation message indicating that requests that use that proto file are likely to break because the source proto file information has been lost. In the future, we intend to expand on proto file deletion to allow for more control over dependent requests.

Expand Down

1 comment on commit d7e362d

@vercel
Copy link

@vercel vercel bot commented on d7e362d Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

insomnia-docs – ./

insomnia-docs-green-rs.vercel.app
insomnia-docs-git-main-green-rs.vercel.app
insomnia-docs-three.vercel.app

Please sign in to comment.