File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2004,25 +2004,25 @@ Similarly a `[T]` cannot be passed to a `[T!]`.
2004
2004
Variables used for OneOf Input Object fields must be non-nullable.
2005
2005
2006
2006
``` graphql example
2007
- mutation addPet ($cat : CatInput ! ) {
2007
+ mutation addCat ($cat : CatInput ! ) {
2008
2008
addPet (pet : { cat : $cat }) {
2009
2009
name
2010
2010
}
2011
2011
}
2012
- ```
2013
-
2014
- ``` graphql counter-example
2015
- mutation addPet ($cat : CatInput ) {
2012
+ mutation addCatWithDefault ($cat : CatInput ! = { name : " Brontie" }) {
2016
2013
addPet (pet : { cat : $cat }) {
2017
2014
name
2018
2015
}
2019
2016
}
2020
2017
```
2021
2018
2022
- Variables used for OneOf Input Object fields cannot have default values.
2023
-
2024
2019
``` graphql counter-example
2025
- mutation addPet ($cat : CatInput = { name : " Kitty" }) {
2020
+ mutation addNullableCat ($cat : CatInput ) {
2021
+ addPet (pet : { cat : $cat }) {
2022
+ name
2023
+ }
2024
+ }
2025
+ mutation addNullableCatWithDefault ($cat : CatInput = { name : " Brontie" }) {
2026
2026
addPet (pet : { cat : $cat }) {
2027
2027
name
2028
2028
}
You can’t perform that action at this time.
0 commit comments