Un-deprecate the select_child, has_child, and child_names methods (#900)

- Issues with removing them documented in issue #878

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
This commit is contained in:
Edward Rudd 2021-03-30 05:12:48 -04:00 committed by GitHub
parent 57165b33a0
commit 09637fba94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# master
- No changes yet
- Un-deprecate select_child, has_child, and child_names methods ([#900]https://github.com/graphql-rust/juniper/pull/#900)
# [[0.15.3] 2021-01-27](https://github.com/graphql-rust/juniper/releases/tag/juniper-0.15.3)

View file

@ -340,14 +340,11 @@ pub trait LookAheadMethods<'sel, S> {
/// Get the the child selection for a given field
/// If a child has an alias, it will only match if the alias matches `name`
#[deprecated(note = "please use `children` to access the child selections instead")]
fn select_child(&self, name: &str) -> Option<&Self>;
/// Check if a given child selection with a name exists
/// If a child has an alias, it will only match if the alias matches `name`
#[deprecated(note = "please use `children` to access the child selections instead")]
fn has_child(&self, name: &str) -> bool {
#[allow(deprecated)]
self.select_child(name).is_some()
}
@ -366,7 +363,6 @@ pub trait LookAheadMethods<'sel, S> {
}
/// Get the (possibly aliased) names of the top level children for the current selection
#[deprecated(note = "please use `children` to access the child selections instead")]
fn child_names(&self) -> Vec<&'sel str>;
/// Get an iterator over the children for the current selection
@ -1307,7 +1303,6 @@ query Hero {
}
#[test]
#[allow(deprecated)]
fn check_select_child() {
let lookahead: LookAheadSelection<DefaultScalarValue> = LookAheadSelection {
name: "hero",
@ -1459,7 +1454,6 @@ fragment heroFriendNames on Hero {
}
#[test]
#[allow(deprecated)]
fn check_visitability() {
let docs = parse_document_source::<DefaultScalarValue>(
"