Skip to content

Commit 3fba591

Browse files
committed
add custom namespace
1 parent e546aac commit 3fba591

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Diff for: spec/Section 7 -- Response.md

+35
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,41 @@ set, must have a map as its value. This entry is reserved for implementers to
2727
extend the protocol however they see fit, and hence there are no additional
2828
restrictions on its contents.
2929

30+
GraphQL Response for an extension with rate limit might look like this:
31+
32+
```json example
33+
{
34+
"data": {
35+
"hero": {
36+
"name": "R2-D2",
37+
"heroFriends": [
38+
{
39+
"id": "1000",
40+
"name": "Luke Skywalker"
41+
},
42+
{
43+
"id": "1002",
44+
"name": null
45+
},
46+
{
47+
"id": "1003",
48+
"name": "Leia Organa"
49+
}
50+
]
51+
}
52+
},
53+
"extensions": {
54+
"customNamespace": {
55+
"requestRate": 2,
56+
"remaining": 98,
57+
"retryAfterMs": 0,
58+
"resetAfterMs": 1985
59+
}
60+
}
61+
}
62+
```
63+
Please note replace `customNamespace` with your customization.
64+
3065
To ensure future changes to the protocol do not break existing services and
3166
clients, the top level response map must not contain any entries other than the
3267
three described above.

0 commit comments

Comments
 (0)