@@ -6,7 +6,7 @@ The core directive is `@grpcMethod`. It can be used on any output field, like so
66
77``` graphql
88type 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
2222extend 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
5050As you can imagine , these definitions can get verbose over time. See the following section for the recommended approach to generating them.
0 commit comments