Skip to content

Commit

Permalink
Merge branch 'develop' into home-blog-redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
neo773 authored Sep 27, 2024
2 parents 07dae18 + 546cfeb commit 2a6fced
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,8 @@ The `@link` directive requires specifying a source `src`, the resource's type `t

- `id`: This is an optional field that assigns a unique identifier to the link. It's helpful for referring to the link within the schema.

- `headers`: This is an optional field that assigns custom headers to the gRPC reflection server requests. Specifying a key-value map of header names and their values achieves this.

### Example

The following example illustrates how to utilize the `@link` directive to incorporate a Protocol Buffers (.proto) file for a gRPC service into your GraphQL schema.
Expand All @@ -1137,6 +1139,7 @@ schema
id: "news"
src: "./src/grpc/news.proto"
type: Protobuf
headers: [{key: "authorization", value: "Bearer 123"}]
) {
query: Query
}
Expand Down

0 comments on commit 2a6fced

Please sign in to comment.