diff --git a/CHANGELOG.md b/CHANGELOG.md index 829dee98..e39b4d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# [4.0.0] 2022-4-19 + +- Add `#[non_exhaustive]` attribute to Request/Response types. +- Introduce ability to pre-parse Request's query. [#891](https://github.com/async-graphql/async-graphql/pull/891) + # [3.0.38] 2022-4-8 - Update Axum integration to Axum 0.5.1 [#883](https://github.com/async-graphql/async-graphql/pull/883) diff --git a/src/request.rs b/src/request.rs index 7e24d82f..d615e5ac 100644 --- a/src/request.rs +++ b/src/request.rs @@ -12,6 +12,7 @@ use crate::{Data, ParseRequestError, ServerError, UploadValue, Value, Variables} /// /// This can be deserialized from a structure of the query string, the operation name and the /// variables. The names are all in `camelCase` (e.g. `operationName`). +#[non_exhaustive] #[derive(Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Request { diff --git a/src/response.rs b/src/response.rs index 08781a8a..e8bcd134 100644 --- a/src/response.rs +++ b/src/response.rs @@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize}; use crate::{CacheControl, Result, ServerError, Value}; /// Query response +#[non_exhaustive] #[derive(Debug, Default, Serialize, Deserialize, PartialEq)] pub struct Response { /// Data of query result