Skip to content

Commit fd5dc3d

Browse files
authored
Merge pull request #399 from getcarv/feature/extensions
Awesome, thanks!
2 parents aac6444 + efffcd1 commit fd5dc3d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graphql_client/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ impl Display for PathFragment {
181181
/// extensions: None,
182182
/// },
183183
/// ]),
184+
/// extensions: None,
184185
/// };
185186
///
186187
/// assert_eq!(body, expected);
@@ -275,6 +276,7 @@ impl Display for Error {
275276
/// dogs: vec![Dog { name: "Strelka".to_owned() }],
276277
/// }),
277278
/// errors: Some(vec![]),
279+
/// extensions: None,
278280
/// };
279281
///
280282
/// assert_eq!(body, expected);
@@ -288,6 +290,9 @@ pub struct Response<Data> {
288290
pub data: Option<Data>,
289291
/// The top-level errors returned by the server.
290292
pub errors: Option<Vec<Error>>,
293+
/// Additional extensions. Their exact format is defined by the server.
294+
/// See [GraphQL Response Specification](https://github.com/graphql/graphql-spec/blob/main/spec/Section%207%20--%20Response.md#response-format)
295+
pub extensions: Option<HashMap<String, serde_json::Value>>,
291296
}
292297

293298
#[cfg(test)]

0 commit comments

Comments
 (0)