Add `ErrorExtensionValues::unset` method.
This commit is contained in:
parent
3d8a8ef6af
commit
dd13716072
|
@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
## Unreleased
|
||||
|
||||
- Change the signature of the `connection::query` function to allow the callback to use any type that implements `Into<Error>`.
|
||||
- Add `ErrorExtensionValues::unset` method.
|
||||
- Use the `SimpleObject` macro and the `InputObject` macro at the same time.
|
||||
- Types that are not referenced will be hidden in introspection.
|
||||
- Make the API of integrations is more consistent.
|
||||
- Remove `async-graphql-tide`.
|
||||
- Rework validators.
|
||||
- Rework guards.
|
||||
|
||||
## [2.11.3] 2021-11-13
|
||||
|
||||
|
|
|
@ -19,6 +19,11 @@ impl ErrorExtensionValues {
|
|||
pub fn set(&mut self, name: impl AsRef<str>, value: impl Into<Value>) {
|
||||
self.0.insert(name.as_ref().to_string(), value.into());
|
||||
}
|
||||
|
||||
/// Unset an extension value.
|
||||
pub fn unset(&mut self, name: impl AsRef<str>) {
|
||||
self.0.remove(name.as_ref());
|
||||
}
|
||||
}
|
||||
|
||||
/// An error in a GraphQL server.
|
||||
|
|
Loading…
Reference in New Issue