Skip to content

Commit 65b82d0

Browse files
committed
grpc: make the GraphQL blocks 2-line indented in README
1 parent 8c047c6 commit 65b82d0

2 files changed

Lines changed: 26 additions & 26 deletions

File tree

extensions/grpc/README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The core directive is `@grpcMethod`. It can be used on any output field, like so
66

77
```graphql
88
type Query {
9-
getFeature(input: PointInput!): Feature @grpcMethod(service: "routeguide.RouteGuide", method: "GetFeature", input: "*")
9+
getFeature(input: PointInput!): Feature @grpcMethod(service: "routeguide.RouteGuide", method: "GetFeature", input: "*")
1010
}
1111
```
1212

@@ -20,31 +20,31 @@ The service must also be defined on your GraphQL schema's schema definition, alo
2020

2121
```graphql
2222
extend schema
23-
@link(url: "{path_str}", import: ["@grpcMethod", "@protoMessages", "@protoServices"])
24-
@protoMessages(definitions: [
25-
{
26-
name: "Point"
27-
fields: [
28-
{ name: "latitude", type: "int32", number: 1 }
29-
{ name: "longitude", type: "int32", number: 2 }
30-
]
31-
},
32-
{
33-
name: "Feature"
34-
fields: [
35-
{ name: "name", type: "string", number: 1 }
36-
{ name: "location", type: "Point", number: 2 }
37-
]
38-
}
39-
])
40-
@protoServices(definitions: [
41-
{
42-
name: "routeguide.RouteGuide"
43-
methods: [
23+
@link(url: "{path_str}", import: ["@grpcMethod", "@protoMessages", "@protoServices"])
24+
@protoMessages(definitions: [
25+
{
26+
name: "Point"
27+
fields: [
28+
{ name: "latitude", type: "int32", number: 1 }
29+
{ name: "longitude", type: "int32", number: 2 }
30+
]
31+
},
32+
{
33+
name: "Feature"
34+
fields: [
35+
{ name: "name", type: "string", number: 1 }
36+
{ name: "location", type: "Point", number: 2 }
37+
]
38+
}
39+
])
40+
@protoServices(definitions: [
41+
{
42+
name: "routeguide.RouteGuide"
43+
methods: [
4444
{ name: "GetFeature", inputType: "Point", outputType: "Feature" }
45-
]
46-
}}
47-
])
45+
]
46+
}}
47+
])
4848
```
4949

5050
As you can imagine, these definitions can get verbose over time. See the following section for the recommended approach to generating them.

extensions/grpc/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "grpc"
33
version = "0.1.0"
44
kind = "resolver"
5-
description = "Let Grafbase Gateway communicate with your GRPC services."
5+
description = "Integrate the Grafbase Gateway communicate with your gRPC services declaratively."
66
repository_url = "https://github.com/grafbase/extensions/tree/main/extensions/grpc"
77
license = "Apache-2.0"
88

0 commit comments

Comments
 (0)